Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate a zh-tw language #12

Open
wants to merge 431 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
431 commits
Select commit Hold shift + click to select a range
ca74e8f
Fix occasionally undefined variable
micgro42 May 11, 2015
98390e8
Fix rewriting of links to moved mediafiles starting with :
micgro42 May 11, 2015
cdbedf5
Save wip
micgro42 May 13, 2015
1c0789b
Fix test to not depend on linkbase detection
May 15, 2015
00c9a89
Fix wrong affected pages by media move
May 15, 2015
31c7c89
Fix findMissingDocuments. page_exists doesn't work for media
May 15, 2015
7aa8a5b
Delete all data to fix random fails
micgro42 May 15, 2015
0501173
Merge pull request #2 from thylacine222/master
May 16, 2015
3ad67da
Skip broken test
micgro42 May 16, 2015
f5e3efd
Remove fixed todo comment
micgro42 May 16, 2015
4a0d316
findMissingDocuments expects both src and dst to end with colon
micgro42 May 16, 2015
1f18d22
Save to file after every move
micgro42 May 16, 2015
65bf5a8
Better filename for lockfile and saver writing
micgro42 May 16, 2015
13b6a34
Merge pull request #1 from micgro42/lockFiles
May 16, 2015
2728c26
Merge pull request #6 from cosmocode/master
May 16, 2015
bbf10b9
Merge pull request #12 from Friuli/patch-2
May 16, 2015
5edd181
Merge pull request #11 from Friuli/patch-1
May 16, 2015
e046a92
Update plugin.info.txt
May 16, 2015
0d8a95f
Added swedish translation, closes #10
michitux May 16, 2015
1970c5f
Move lang string from source to lang.php
micgro42 May 16, 2015
d505cd8
translation update
soakindulge May 22, 2015
dedaba3
translation update
e-dschungel May 24, 2015
6ee2d4f
translation update
nfriedli May 25, 2015
2549f02
Merge pull request #19 from dokuwiki-translate/lang_update_12
michitux May 25, 2015
42806c4
Merge pull request #18 from dokuwiki-translate/lang_update_8
michitux May 25, 2015
8efe60c
translation update
e-dschungel May 26, 2015
484a09e
Merge pull request #16 from dokuwiki-translate/lang_update_1
michitux May 30, 2015
4269b44
Merge pull request #21 from dokuwiki-translate/lang_update_17
michitux May 30, 2015
dcfe7d3
translation update
schplurtz Jun 1, 2015
86876d6
Merge pull request #23 from dokuwiki-translate/lang_update_23
michitux Jun 2, 2015
ad294df
translation update
Jun 10, 2015
902de8b
Merge pull request #24 from dokuwiki-translate/lang_update_4
michitux Jun 11, 2015
0665263
Merge pull request #13 from micgro42/updateLang
michitux Jun 11, 2015
108e7c5
translation update
e-dschungel Jun 11, 2015
367f300
translation update
schplurtz Jun 23, 2015
1d4f7a9
translation update
Jun 26, 2015
ba35fc4
Merge pull request #26 from dokuwiki-translate/lang_update_10
michitux Jun 28, 2015
093af1c
Merge pull request #29 from dokuwiki-translate/lang_update_22
michitux Jun 28, 2015
1b422ab
Merge pull request #30 from dokuwiki-translate/lang_update_33
michitux Jun 28, 2015
f2f492f
translation update
Jun 29, 2015
dde9f03
translation update
Jul 9, 2015
41faeb1
Added support to Bootstrap3 Template
giterlizzi Jul 18, 2015
0e14fb0
Update settings.php
trebmuh Jul 22, 2015
df0c9c5
Merge pull request #39 from trebmuh/patch-1
michitux Jul 24, 2015
f9868e6
Merge pull request #36 from dokuwiki-translate/lang_update_70
michitux Jul 24, 2015
6c210a6
Merge pull request #34 from dokuwiki-translate/lang_update_41
michitux Jul 24, 2015
e3f1533
translation update
sawachan Jul 31, 2015
afea89f
Merge pull request #40 from dokuwiki-translate/lang_update_166
michitux Jul 31, 2015
3c692d0
translation update
sawachan Aug 1, 2015
e086c93
translation update
araname Aug 16, 2015
df61a50
Typo in comment.
Aug 19, 2015
4aec289
update czech language files
Aug 19, 2015
782f45f
Shows error message for duplicite filename.
Aug 19, 2015
f89655c
exclude github related files from export
glensc Aug 25, 2015
29c1de3
Merge pull request #46 from glensc/gitattrs
michitux Oct 17, 2015
052a062
Merge pull request #41 from dokuwiki-translate/lang_update_180
michitux Oct 17, 2015
e4e0ce7
Merge pull request #42 from dokuwiki-translate/lang_update_832
michitux Oct 17, 2015
9a643ae
Merge pull request #43 from kochichi/master
michitux Oct 17, 2015
967e79d
Merge pull request #38 from LotarProject/master
michitux Oct 17, 2015
228db22
Add test case for cache handling
michitux Oct 17, 2015
bce6806
Fix cache handling, the cache was not expired on moves.
michitux Oct 17, 2015
a904da2
Add missing isset() before variable access
michitux Oct 17, 2015
54f18c5
Fix #54 adding ':' to absolute ids in the root namespace
michitux Oct 17, 2015
50e7b1c
New version 2015-10-17 released. Bug fixes and translation updates.
michitux Oct 17, 2015
1388aff
Renamed test file
michitux Oct 18, 2015
5203767
Clean media ids, too. Might help with #52
michitux Oct 18, 2015
98b910b
Minor documentation fix
michitux Oct 18, 2015
5ade0f8
Remove redundant code (the same is already in resolve_id)
michitux Oct 18, 2015
46c2a44
Restore PHP 5.2 compatibility, fixes #35
michitux Oct 18, 2015
0bdc6d1
New version 2015-10-18 released (bug fixes for media moves and PHP 5.2)
michitux Oct 18, 2015
12ea564
Create lang.php
Oct 22, 2015
4c94cb9
Create move.txt
Oct 22, 2015
c24dd42
Create progress.txt
Oct 22, 2015
e48711b
Create settings.php
Oct 22, 2015
5fc4f95
Create tree.txt
Oct 22, 2015
c47c1ae
Update lang.php
chang-zhao Oct 29, 2015
75825cf
Update move.txt
chang-zhao Oct 29, 2015
1a8bbcf
Create progress.txt
chang-zhao Oct 29, 2015
cadbe91
Create settings.php
chang-zhao Oct 29, 2015
e4a6d66
Create tree.txt
chang-zhao Oct 29, 2015
4fd253c
Merge pull request #60 from chang-zhao/update-translation-ru
michitux Oct 29, 2015
96a27ea
Merge pull request #55 from it4u/patch-6
michitux Oct 29, 2015
724f08f
Merge pull request #56 from it4u/patch-5
michitux Oct 29, 2015
89c60ca
Merge pull request #57 from it4u/patch-4
michitux Oct 29, 2015
185250a
Merge pull request #58 from it4u/patch-3
michitux Oct 29, 2015
693bfc0
Merge pull request #59 from it4u/patch-2
michitux Oct 29, 2015
acaf0fe
translation update
cschive Nov 28, 2015
defcb5e
Merge pull request #62 from dokuwiki-translate/lang_update_76
michitux Dec 17, 2015
bbd8e8f
translation update
frnogueira Dec 23, 2015
f3af661
Merge pull request #63 from dokuwiki-translate/lang_update_123
michitux Dec 24, 2015
dec4666
translation update
danielraknes Jan 20, 2016
92cd086
Merge pull request #64 from dokuwiki-translate/lang_update_3
michitux Jan 20, 2016
7cdbeda
Fix typo in French settings
dregad Mar 22, 2016
bc20e19
Merge pull request #69 from dregad/patch-1
michitux Mar 25, 2016
b19b2e3
translation update
dturkalj Jun 3, 2016
ba60008
Merge pull request #71 from dokuwiki-translate/lang_update_34
michitux Jun 5, 2016
b28d375
Remove old files on update
micgro42 Jun 30, 2016
b8e4b54
Remove all old files on update
micgro42 Jun 30, 2016
83395c6
Merge pull request #73 from micgro42/bugfix/deleteOldFiles
michitux Jul 8, 2016
2f41490
translation update
araname Jul 27, 2016
129c020
Merge pull request #76 from dokuwiki-translate/lang_update_25
michitux Sep 18, 2016
ebffba7
feat: Add config to toggle pagetools integration
micgro42 Dec 5, 2016
fb13e13
Remove space character from configuration key
michitux Jan 2, 2017
11fe6b4
Show hidden pages in tree move
michitux Jan 2, 2017
a428ba5
Make the handler helper a proper helper plugin, fixes #84, fixes #33
michitux Jan 2, 2017
99d285f
New version 2017-01-02 released.
michitux Jan 2, 2017
fe7b1a1
Tree move ui: add new drag & drop logic, fixes #17 (move into empty f…
michitux Jan 3, 2017
2e9872c
Tree move: Add checkboxes to allow moving many pages resolve #66
michitux Jan 3, 2017
a6dfdd2
Fixes for tree move: root can be closed, reset heights correctly
michitux Jan 3, 2017
ed105af
translation update
e-dschungel Jan 5, 2017
e5ec980
Merge pull request #91 from dokuwiki-translate/lang_update_229
michitux Jan 6, 2017
7f0935c
Remove some duplicate JS code
michitux Jan 6, 2017
f8254d4
Add create namespace feature in tree move ui #77
michitux Jan 6, 2017
d638c45
Add icon sources/license
michitux Jan 7, 2017
06b7ca4
New version 2017-01-07 released
michitux Jan 7, 2017
2f859ee
translation update
sawachan Jan 11, 2017
e81a831
Merge pull request #92 from dokuwiki-translate/lang_update_233
michitux Jan 11, 2017
bb3346c
translation update
arnehanssen Jan 29, 2017
d89f813
Merge pull request #97 from dokuwiki-translate/lang_update_250
michitux Jan 29, 2017
9d8722f
translation update
schplurtz Feb 14, 2017
a6d2773
Merge pull request #98 from dokuwiki-translate/lang_update_263
michitux Feb 14, 2017
5e5dd9d
translation update
KumaNNN Feb 25, 2017
8ab8248
Merge pull request #101 from dokuwiki-translate/lang_update_293
michitux Feb 25, 2017
dcf6d3e
translation update
martinr-kytka Mar 16, 2017
7205a3e
translation update
dturkalj May 23, 2017
3436d2b
Merge pull request #115 from dokuwiki-translate/lang_update_382
splitbrain May 23, 2017
98a0e35
translation update
May 25, 2017
aca0c0c
Merge pull request #116 from dokuwiki-translate/lang_update_398
michitux May 25, 2017
21fd566
enlarge newname input field #117
rattkin Jun 13, 2017
b5e7779
translation update
Jul 17, 2017
2fb3cba
Merge pull request #121 from dokuwiki-translate/lang_update_463
splitbrain Jul 18, 2017
4c86e28
Merge pull request #118 from rattkin/patch-1
michitux Sep 21, 2017
8953fad
translation update
docxml Sep 26, 2017
07e474a
Merge pull request #125 from dokuwiki-translate/lang_update_556
splitbrain Oct 3, 2017
3fc280d
translation update
jFMd21 Oct 4, 2017
04f3a10
translation update
jFMd21 Oct 4, 2017
6d84ccb
Merge pull request #126 from dokuwiki-translate/lang_update_570
splitbrain Oct 4, 2017
54c2e91
Merge pull request #127 from dokuwiki-translate/lang_update_571
splitbrain Oct 4, 2017
25b5a94
translation update
jFMd21 Oct 19, 2017
24b76f7
translation update
jFMd21 Oct 19, 2017
beffdc9
translation update
alexgearbox Nov 3, 2017
d83f77f
Merge pull request #135 from dokuwiki-translate/lang_update_607_15097…
splitbrain Nov 5, 2017
c18ef0a
Merge pull request #130 from dokuwiki-translate/lang_update_593_15083…
splitbrain Nov 5, 2017
6ad555c
Merge pull request #129 from dokuwiki-translate/lang_update_592_15083…
splitbrain Nov 5, 2017
7026b5d
Merge pull request #113 from dokuwiki-translate/lang_update_339
splitbrain Nov 5, 2017
50cf7af
translation update
alexgearbox Nov 5, 2017
498d6c9
Merge pull request #136 from dokuwiki-translate/lang_update_611_15098…
splitbrain Nov 5, 2017
71c8763
added description for checkboxes
tormec Nov 14, 2017
d1cf09b
changed "have to" in "want to"
tormec Nov 14, 2017
5173034
translation update
Klap-in Jan 3, 2018
3b961f0
Merge pull request #140 from dokuwiki-translate/lang_update_697_15149…
splitbrain Jan 3, 2018
0f9dde9
feat: add pagetools button with new svg mechanism
micgro42 Jan 19, 2018
c27d0fa
translation update
oleksiyfur Feb 15, 2018
c69ea4d
Merge pull request #142 from dokuwiki-translate/lang_update_749_15187…
michitux Feb 15, 2018
4cb1aea
fix: use legacy array creation syntax
micgro42 Feb 16, 2018
6eb5188
Merge pull request #141 from michitux/addNewMenuItem
michitux Feb 16, 2018
9aafe3b
translation update
oleksiyfur Feb 20, 2018
51e6c34
translation update
Apr 23, 2018
6e4616c
Version upped for Greebo
micgro42 Apr 30, 2018
57fff87
chore: test only on supported PHP versions
micgro42 Apr 30, 2018
ab15946
Rewrite helper: discard empty metadata
michitux Oct 1, 2018
ee07a9d
Plan helper: initialize all arrays
michitux Oct 1, 2018
fc4412f
Plan tests: store error on mocked failure
michitux Oct 1, 2018
c3e93b5
translation update
Nov 14, 2018
808f96b
Merge pull request #152 from dokuwiki-translate/lang_update_1040_1542…
splitbrain Nov 14, 2018
205cf38
translation update
Kastra28 Nov 30, 2018
1cbef6d
Merge pull request #155 from dokuwiki-translate/lang_update_1090_1543…
splitbrain Dec 1, 2018
4cab1d5
translation update
Kastra28 Dec 2, 2018
ce8e173
translation update
Kastra28 Dec 4, 2018
4757551
translation update
Kastra28 Dec 4, 2018
4862ebf
translation update
Kastra28 Dec 4, 2018
ab0d9e6
translation update
BECJIE32 Dec 11, 2018
77929fc
translation update
BECJIE32 Dec 14, 2018
66df258
translation update
BECJIE32 Dec 14, 2018
897ec31
translation update
Kastra28 Jan 29, 2019
f6b5166
Cosmetics: Correct copy&paste error in documemtation comments
th-we Apr 28, 2019
80ab123
Merge pull request #170 from notengrafik/pr/menu-item-doc-comments
michitux Apr 28, 2019
ffbd915
translation update
Kastra28 May 1, 2019
b9f5187
translation update
Mutanarq Aug 3, 2019
01bfd92
Merge branch 'lang_update_1233_1556700304'
michitux Aug 4, 2019
b9b8d12
Merge branch 'lang_update_1162_1548781645'
michitux Aug 4, 2019
2d456bd
Merge branch 'lang_update_1112_1544809826'
michitux Aug 4, 2019
b1ad91d
Merge branch 'lang_update_1111_1544807250' #162
michitux Aug 4, 2019
ff54f97
Merge some changes from 'lang_update_1101_1544521844' #161
michitux Aug 4, 2019
af557ba
Merge branch 'lang_update_1095_1543944369' #160
michitux Aug 4, 2019
f21052e
Merge branch 'lang_update_1094_1543944057' #159
michitux Aug 4, 2019
083c05e
Merge branch 'lang_update_1093_1543943362' #158
michitux Aug 4, 2019
4265c85
Merge branch 'lang_update_1091_1543776225' #157
michitux Aug 4, 2019
e23c93a
Merge branch 'lang_update_751_1519140042'
michitux Aug 4, 2019
4152dcc
Merge branch 'lang_update_816_1524494109'
michitux Aug 4, 2019
bb4102b
Check if JSINFO is defined, closes #31
michitux Aug 4, 2019
334946a
Slight rewording of the tree move help
michitux Aug 4, 2019
4263921
Merge branch 'heads/pullreqs/137'
michitux Aug 4, 2019
f884dc6
Add admin.svg, copy of images/rename.svg closes #168
michitux Aug 4, 2019
5538001
Travis: test PHP 7.3 and DokuWiki old-stable, use local phpunit
michitux Aug 6, 2019
b53c6e1
translation update
Feb 27, 2020
8b86edd
Merge pull request #178 from dokuwiki-translate/lang_update_1449_1582…
michitux Feb 27, 2020
3f59277
translation update
May 8, 2020
06685c7
Merge pull request #182 from dokuwiki-translate/lang_update_18_158891…
splitbrain May 11, 2020
df8cae8
translation update
jacobpalm May 22, 2020
7c5a89d
Fix deprecated array syntax
annda Aug 17, 2020
efb8e0e
Merge pull request #186 from cosmocode/deprecated-syntax
splitbrain Aug 17, 2020
493b5c2
Fix spellings of "committed" key to avoid undefined array key errors.
bradbulger Dec 28, 2020
fda5dba
Merge pull request #195 from bradbulger/issue194
michitux Jan 27, 2021
91cfbff
PHPUnit tests: fix function signatures
dregad Feb 6, 2021
79f824c
PHPUnit tests: fix "Undefined array key 1" error
dregad Feb 6, 2021
6a0dbb3
German translation: added comma
bleistivt Oct 22, 2021
8ad5b48
added translation to sk language
vkristian Jan 13, 2022
15da76f
Merge pull request #211 from vkristian/master
splitbrain Jan 15, 2022
83e018a
Replace Travis by GitHub Actions
michitux Jan 23, 2022
e2441e1
Fix handling of empty line in the plan
michitux Jan 23, 2022
aafbf8c
Merge pull request #198 from dregad/phpunit8
michitux Jan 23, 2022
1ceb486
Merge pull request #208 from bleistivt/patch-1
michitux Jan 23, 2022
6e56e1e
Version upped
michitux Jan 23, 2022
195d39c
Attach JS rename handler to mobile menu items.
splitbrain Jan 24, 2022
d42179e
avoid clash with old pagetool CSS, unset mobile dropdown
splitbrain Jan 25, 2022
f241614
Merge pull request #214 from michitux/bug150
michitux Jan 26, 2022
cefbae5
Fix rewriting of links to the root start page
michitux Jan 26, 2022
f74b36a
translation update
nawan95 Mar 4, 2022
7855074
Allow move to work if acl is disabled
glensc Apr 24, 2023
6a6cdb7
translation update
May 9, 2023
52a9cbe
translation update
nerun May 29, 2023
5e690ca
Merge pull request #243 from dokuwiki-translate/lang_update_647_16853…
splitbrain May 31, 2023
3e816af
Merge pull request #215 from michitux/bug213
michitux Jun 1, 2023
56d59e2
Merge pull request #240 from dokuwiki-translate/lang_update_631_16836…
michitux Jun 1, 2023
203bdaa
Merge pull request #238 from glensc/no-acl
michitux Jun 1, 2023
2a02f84
Merge pull request #217 from dokuwiki-translate/lang_update_409_16463…
michitux Jun 2, 2023
dab956f
Merge pull request #184 from dokuwiki-translate/lang_update_43_159018…
michitux Jun 2, 2023
32c4849
replace invalid call to jQuery.form() fixes #244
splitbrain Jun 1, 2023
673900a
Integrate into media manager
annda Jun 7, 2023
779fa0e
Improve error handling and messages
annda Jun 8, 2023
302c75c
Additional check on media file extensions
annda Jun 8, 2023
e4f1b7f
Merge pull request #245 from michitux/formcall
michitux Jun 9, 2023
27a1b6d
Check renaming restrictions when moving media
annda Jun 21, 2023
0af31bb
Media manager: early check if user is allowed to rename files
annda Jun 27, 2023
b2e378d
Merge pull request #246 from cosmocode/mediamanager
michitux Jun 27, 2023
42c7121
Fix media renaming with URL rewriting
annda Jun 28, 2023
8ba3be2
Merge pull request #248 from cosmocode/mm-url-fix
michitux Jun 28, 2023
f1684ff
translation update
schplurtz Aug 15, 2023
4f423b7
Merge pull request #249 from dokuwiki-translate/lang_update_695_16920…
michitux Mar 4, 2024
f175a7a
Fix PHP warning when user not logged in
dregad Apr 26, 2024
c67a68d
Bump version
dregad Apr 26, 2024
fbb9ff7
Merge pull request #275 from dregad/i256-php-warning
michitux Apr 30, 2024
db707ae
Add modern plugin skeleton
michitux Apr 30, 2024
577a39e
Version upped
michitux May 7, 2024
8c44e30
Add release workflow
michitux May 7, 2024
941af2b
Fix #251 undefined array keys
michitux May 7, 2024
25f3554
New version, fixed undefined array key warnings
michitux May 7, 2024
788b8f5
translation update
Oct 31, 2024
8c32b23
Merge pull request #283 from dokuwiki-translate/lang_update_979_17303…
splitbrain Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.gitignore export-ignore
/.gitattributes export-ignore
/.travis.yml export-ignore
11 changes: 11 additions & 0 deletions .github/workflows/dokuwiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: DokuWiki Default Tasks
on:
push:
pull_request:
schedule:
- cron: '1 18 5 * *'


jobs:
all:
uses: dokuwiki/github-action/.github/workflows/all.yml@main
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Create release on change to plugin.info.txt version line
# https://github.com/dokuwiki/dokuwiki/issues/3951
#
# Requires DOKUWIKI_USER and DOKUWIKI_PASS secrets be set in GitHub Actions

name: Release

on:
push:
branches:
- master
paths:
- "*.info.txt"

jobs:
release:
name: Release
# https://github.com/dokuwiki/dokuwiki/pull/3966
uses: glensc/dokuwiki/.github/workflows/plugin-release.yml@39431875f734bddc35cc6b4a899bbfdec97e8aba
secrets:
DOKUWIKI_USER: ${{ secrets.DOKUWIKI_USER }}
DOKUWIKI_PASS: ${{ secrets.DOKUWIKI_PASS }}

# vim:ts=2:sw=2:et
339 changes: 339 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions MenuItem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
namespace dokuwiki\plugin\move;
use dokuwiki\Menu\Item\AbstractItem;
/**
* Class MenuItem
*
* Implements the Rename button for DokuWiki's menu system
*
* @package dokuwiki\plugin\move
*/
class MenuItem extends AbstractItem {

/** @var string icon file */
protected $svg = __DIR__ . '/images/rename.svg';

protected $type = "plugin_move";

public function getLinkAttributes($classprefix = 'menuitem ') {
$attr = parent::getLinkAttributes($classprefix);
if (empty($attr['class'])) {
$attr['class'] = '';
}
$attr['class'] .= ' plugin_move_page ';
return $attr;
}
/**
* Get label from plugin language file
*
* @return string
*/
public function getLabel() {
$hlp = plugin_load('action', 'move_rename');
return $hlp->getLang('renamepage');
}
}
54 changes: 53 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1 +1,53 @@
A DokuWiki pagemove plugin
move Plugin for DokuWiki

Move and rename pages and media files while maintaining the links.

All documentation for this plugin can be found at
http://www.dokuwiki.org/plugin:move

If you install this plugin manually, make sure it is installed in
lib/plugins/move/ - if the folder is called different it
will not work!

Please refer to http://www.dokuwiki.org/plugins for additional info
on how to install plugins in DokuWiki.

----
Copyright (C) Michael Hamann <[email protected]>,
Andreas Gohr <[email protected]>,
and others

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

See the COPYING file in your DokuWiki folder for details

Sources of the icons contained in images/:

disk.png
folder_add.png
page.png
page_link.png

Silk icon set 1.3

_________________________________________
Mark James
http://www.famfamfam.com/lab/icons/silk/
_________________________________________

Licensed under a
Creative Commons Attribution 2.5 License.
[ http://creativecommons.org/licenses/by/2.5/ ]


rename.png

SEMLabs Free Web Design Icon Set,
http://semlabs.co.uk/blog/free-web-design-icon-set/
84 changes: 84 additions & 0 deletions _test/GeneralTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?php

namespace dokuwiki\plugin\move\test;

use DokuWikiTest;

/**
* General tests for the move plugin
*
* @group plugin_move
* @group plugins
*/
class GeneralTest extends DokuWikiTest
{
/**
* Simple test to make sure the plugin.info.txt is in correct format
*/
public function testPluginInfo(): void
{
$file = __DIR__ . '/../plugin.info.txt';
$this->assertFileExists($file);

$info = confToHash($file);

$this->assertArrayHasKey('base', $info);
$this->assertArrayHasKey('author', $info);
$this->assertArrayHasKey('email', $info);
$this->assertArrayHasKey('date', $info);
$this->assertArrayHasKey('name', $info);
$this->assertArrayHasKey('desc', $info);
$this->assertArrayHasKey('url', $info);

$this->assertEquals('move', $info['base']);
$this->assertRegExp('/^https?:\/\//', $info['url']);
$this->assertTrue(mail_isvalid($info['email']));
$this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']);
$this->assertTrue(false !== strtotime($info['date']));
}

/**
* Test to ensure that every conf['...'] entry in conf/default.php has a corresponding meta['...'] entry in
* conf/metadata.php.
*/
public function testPluginConf(): void
{
$conf_file = __DIR__ . '/../conf/default.php';
$meta_file = __DIR__ . '/../conf/metadata.php';

if (!file_exists($conf_file) && !file_exists($meta_file)) {
self::markTestSkipped('No config files exist -> skipping test');
}

if (file_exists($conf_file)) {
include($conf_file);
}
if (file_exists($meta_file)) {
include($meta_file);
}

$this->assertEquals(
gettype($conf),
gettype($meta),
'Both ' . DOKU_PLUGIN . 'move/conf/default.php and ' . DOKU_PLUGIN . 'move/conf/metadata.php have to exist and contain the same keys.'
);

if ($conf !== null && $meta !== null) {
foreach ($conf as $key => $value) {
$this->assertArrayHasKey(
$key,
$meta,
'Key $meta[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'move/conf/metadata.php'
);
}

foreach ($meta as $key => $value) {
$this->assertArrayHasKey(
$key,
$conf,
'Key $conf[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'move/conf/default.php'
);
}
}
}
}
58 changes: 58 additions & 0 deletions _test/affectedPagesNs.test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?php


/**
* Test cases for the move plugin
*
* @group plugin_move
* @group plugins
*/
class plugin_move_affectedPagesNS_test extends DokuWikiTest {

protected $pluginsEnabled = array('move',);

public function setUp(): void {
parent::setUp();
global $USERINFO;
global $conf;
$conf['useacl'] = 1;
$conf['superuser'] = 'john';
$_SERVER['REMOTE_USER'] = 'john'; //now it's testing as admin
$USERINFO['grps'] = array('admin','user');
}

/**
* @coversNothing
*/
public function tearDown(): void {
/** @var helper_plugin_move_plan $plan */
$plan = plugin_load('helper', 'move_plan');
$plan->abort();
parent::tearDown();
}

/**
* @covers helper_plugin_move_plan::findAffectedPages
* @uses Doku_Indexer
*/
public function test_affectedPagesNS_Media() {

saveWikiText('oldns:start', '{{oldnsimage_missing.png}}', 'setup');
idx_addPage('oldns:start');

/** @var helper_plugin_move_plan $plan */
$plan = plugin_load('helper','move_plan');

$this->assertFalse($plan->inProgress());

$plan->addMediaNamespaceMove('oldns', 'newns');

$plan->commit();

$affected_file = file(TMP_DIR . '/data/meta/__move_affected');

$this->assertSame('oldns:start',trim($affected_file[0]));

}

}
47 changes: 47 additions & 0 deletions _test/cache_handling.test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

// must be run within Dokuwiki
if (!defined('DOKU_INC')) die();

/**
* Test cases for the move plugin
*
* @group plugin_move
* @group plugins
*/
class plugin_move_cache_handling_test extends DokuWikiTest {

function setUp(): void {
parent::setUpBeforeClass();
$this->pluginsEnabled[] = 'move';
parent::setUp();
}

/**
* @group slow
*/
function test_cache_handling() {
$testid = 'wiki:bar:test';
saveWikiText($testid,
'[[wiki:foo:]]', 'Test setup');
idx_addPage($testid);
saveWikiText('wiki:foo:start',
'bar', 'Test setup');
idx_addPage('wiki:foo:start');

sleep(1); // wait in order to make sure that conditions with < give the right result.
p_wiki_xhtml($testid); // populate cache

$cache = new cache_renderer($testid, wikiFN($testid), 'xhtml');
$this->assertTrue($cache->useCache());

/** @var helper_plugin_move_op $move */
$move = plugin_load('helper', 'move_op');
$this->assertTrue($move->movePage('wiki:foo:start', 'wiki:foo2:start'));

$cache = new cache_renderer($testid, wikiFN($testid), 'xhtml');
$this->assertFalse($cache->useCache());

}

}
Loading