add contents
This commit is contained in:
1
lib/plugins/pagemove/README
Normal file
1
lib/plugins/pagemove/README
Normal file
@@ -0,0 +1 @@
|
||||
A DokuWiki pagemove plugin
|
10
lib/plugins/pagemove/_test/pagemove.group.php
Normal file
10
lib/plugins/pagemove/_test/pagemove.group.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
require_once(DOKU_INC.'_test/lib/unittest.php');
|
||||
|
||||
class PagemoveGroupTest extends Doku_GroupTest {
|
||||
function testPagemoveGroup() {
|
||||
$dir = dirname(__FILE__).'/';
|
||||
$this->GroupTest('pagemove_group_test');
|
||||
$this->addTestFile($dir . 'pagemove.test.php');
|
||||
}
|
||||
}
|
547
lib/plugins/pagemove/_test/pagemove.test.php
Normal file
547
lib/plugins/pagemove/_test/pagemove.test.php
Normal file
@@ -0,0 +1,547 @@
|
||||
<?php
|
||||
require_once(DOKU_INC.'_test/lib/unittest.php');
|
||||
|
||||
require_once(DOKU_INC.'inc/init.php');
|
||||
require_once(DOKU_INC.'inc/plugin.php');
|
||||
require_once(DOKU_INC.'inc/common.php');
|
||||
require_once(DOKU_INC.'lib/plugins/pagemove/admin.php');
|
||||
|
||||
class PagemovePageTest extends Doku_UnitTestCase {
|
||||
|
||||
var $movedId = 'parent_ns:current_ns:test_page';
|
||||
var $parentBacklinkingId = 'parent_ns:some_page';
|
||||
var $currentNsBacklinkingId = 'parent_ns:current_ns:some_page';
|
||||
var $otherBacklinkingId = 'level0:level1:other_backlinking_page';
|
||||
var $subNsPage = 'parent_ns:current_ns:sub_ns:some_page';
|
||||
|
||||
// @todo Move page to an ID which already exists
|
||||
// @todo Check backlinks of a sub-namespace page (moving same, up, down, different)
|
||||
|
||||
function setUp() {
|
||||
global $ID;
|
||||
global $INFO;
|
||||
|
||||
$ID = $this->movedId;
|
||||
|
||||
$text = <<<EOT
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$summary = 'Test';
|
||||
saveWikiText($this->movedId, $text, $summary);
|
||||
$INFO = pageinfo();
|
||||
|
||||
$text = <<<EOT
|
||||
[[$this->movedId|$this->movedId]]
|
||||
[[:$this->movedId|:$this->movedId]]
|
||||
[[.current_ns:test_page|.current_ns:test_page]]
|
||||
[[.:current_ns:test_page|.:current_ns:test_page]]
|
||||
[[..parent_ns:current_ns:test_page|..parent_ns:current_ns:test_page]]
|
||||
[[test_page|test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
saveWikiText($this->parentBacklinkingId, $text, $summary);
|
||||
|
||||
$text = <<<EOT
|
||||
[[$this->movedId|$this->movedId]]
|
||||
[[:$this->movedId|:$this->movedId]]
|
||||
[[..current_ns:test_page|..current_ns:test_page]]
|
||||
[[..:current_ns:test_page|..:current_ns:test_page]]
|
||||
[[test_page|test_page]]
|
||||
[[.test_page|.test_page]]
|
||||
[[.:test_page|.:test_page]]
|
||||
[[..test_page|..test_page]]
|
||||
[[..:test_page|..:test_page]]
|
||||
[[.:..:test_page|.:..:test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
saveWikiText($this->currentNsBacklinkingId, $text, $summary);
|
||||
|
||||
$text = <<<EOT
|
||||
[[$this->movedId|$this->movedId]]
|
||||
[[:$this->movedId|:$this->movedId]]
|
||||
[[.current_ns:test_page|.current_ns:test_page]]
|
||||
[[.:current_ns:test_page|.:current_ns:test_page]]
|
||||
[[test_page|test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
saveWikiText($this->otherBacklinkingId, $text, $summary);
|
||||
|
||||
$text = <<<EOT
|
||||
[[$this->movedId|$this->movedId]]
|
||||
[[:$this->movedId|:$this->movedId]]
|
||||
[[..:..current_ns:test_page|..:..current_ns:test_page]]
|
||||
[[..:..:current_ns:test_page|..:..:current_ns:test_page]]
|
||||
[[test_page|test_page]]
|
||||
[[..:test_page|..:test_page]]
|
||||
[[..:test_page|..:test_page]]
|
||||
[[.:..:test_page|.:..:test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[..:new_page|..:new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
saveWikiText($this->subNsPage, $text, $summary);
|
||||
|
||||
$this->pagemove = new admin_plugin_pagemove();
|
||||
}
|
||||
|
||||
# function testPagemove() {
|
||||
# $this->assertEqual(1,1);
|
||||
# }
|
||||
|
||||
// function test_pm_getforwardlinks() {
|
||||
// $origLinkAbsLinkArray = $this->pagemove->_pm_getforwardlinks($this->movedId);
|
||||
// }
|
||||
|
||||
function test_move_page_in_same_ns() {
|
||||
global $ID;
|
||||
|
||||
$newPagename = 'new_page';
|
||||
|
||||
$opts = array();
|
||||
$opts['page_ns'] = 'page';
|
||||
$opts['ns'] = getNS($ID);
|
||||
$opts['name'] = noNS($ID);
|
||||
$opts['newns'] = $opts['ns'];
|
||||
$opts['newname'] = $newPagename;
|
||||
$this->movedToId = $opts['newns'].':'.$newPagename;
|
||||
$this->pagemove->_pm_move_page($opts);
|
||||
|
||||
$newId = $opts['newns'].':'.$opts['newname'];
|
||||
$newContent = rawWiki($newId);
|
||||
$expectedContent = <<<EOT
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[start|.:]]
|
||||
[[start|..current_ns:]]
|
||||
[[start|..:current_ns:]]
|
||||
[[parent_ns:parallel_ns:start|..parallel_ns:]]
|
||||
[[parent_ns:parallel_ns:start|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[parent_ns:start|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns:new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
|
||||
$newContent = rawWiki($this->parentBacklinkingId);
|
||||
$expectedContent = <<<EOT
|
||||
[[.:current_ns:new_page|$this->movedId]]
|
||||
[[.:current_ns:new_page|:$this->movedId]]
|
||||
[[.:current_ns:new_page|.current_ns:test_page]]
|
||||
[[.:current_ns:new_page|.:current_ns:test_page]]
|
||||
[[.:current_ns:new_page|..parent_ns:current_ns:test_page]]
|
||||
[[test_page|test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
|
||||
$newContent = rawWiki($this->currentNsBacklinkingId);
|
||||
$expectedContent = <<<EOT
|
||||
[[new_page|$this->movedId]]
|
||||
[[new_page|:$this->movedId]]
|
||||
[[new_page|..current_ns:test_page]]
|
||||
[[new_page|..:current_ns:test_page]]
|
||||
[[new_page|test_page]]
|
||||
[[new_page|.test_page]]
|
||||
[[new_page|.:test_page]]
|
||||
[[..test_page|..test_page]]
|
||||
[[..:test_page|..:test_page]]
|
||||
[[.:..:test_page|.:..:test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
|
||||
$newContent = rawWiki($this->otherBacklinkingId);
|
||||
$expectedContent = <<<EOT
|
||||
[[parent_ns:current_ns:new_page|$this->movedId]]
|
||||
[[$newId|:$this->movedId]]
|
||||
[[.current_ns:test_page|.current_ns:test_page]]
|
||||
[[.:current_ns:test_page|.:current_ns:test_page]]
|
||||
[[test_page|test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
}
|
||||
|
||||
|
||||
function test_move_page_to_parallel_ns() {
|
||||
global $ID;
|
||||
|
||||
$newPagename = 'new_page';
|
||||
|
||||
$opts = array();
|
||||
$opts['page_ns'] = 'page';
|
||||
$opts['ns'] = getNS($ID);
|
||||
$opts['name'] = noNS($ID);
|
||||
$opts['newns'] = 'parent_ns:parallel_ns';
|
||||
$opts['newname'] = $newPagename;
|
||||
$this->movedToId = $opts['newns'].':'.$newPagename;
|
||||
$this->pagemove->_pm_move_page($opts);
|
||||
|
||||
$newId = $opts['newns'].':'.$opts['newname'];
|
||||
$newContent = rawWiki($newId);
|
||||
$expectedContent = <<<EOT
|
||||
[[parent_ns:current_ns:start|start]]
|
||||
[[parent_ns:current_ns:parallel_page|parallel_page]]
|
||||
[[parent_ns:current_ns:start|.:]]
|
||||
[[parent_ns:current_ns:start|..current_ns:]]
|
||||
[[parent_ns:current_ns:start|..:current_ns:]]
|
||||
[[start|..parallel_ns:]]
|
||||
[[start|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[parent_ns:start|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns:new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
|
||||
$newContent = rawWiki($this->parentBacklinkingId);
|
||||
$expectedContent = <<<EOT
|
||||
[[.:parallel_ns:new_page|$this->movedId]]
|
||||
[[.:parallel_ns:new_page|:$this->movedId]]
|
||||
[[.:parallel_ns:new_page|.current_ns:test_page]]
|
||||
[[.:parallel_ns:new_page|.:current_ns:test_page]]
|
||||
[[.:parallel_ns:new_page|..parent_ns:current_ns:test_page]]
|
||||
[[test_page|test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
|
||||
$newContent = rawWiki($this->currentNsBacklinkingId);
|
||||
$expectedContent = <<<EOT
|
||||
[[parent_ns:parallel_ns:new_page|$this->movedId]]
|
||||
[[$newId|:$this->movedId]]
|
||||
[[parent_ns:parallel_ns:new_page|..current_ns:test_page]]
|
||||
[[parent_ns:parallel_ns:new_page|..:current_ns:test_page]]
|
||||
[[parent_ns:parallel_ns:new_page|test_page]]
|
||||
[[parent_ns:parallel_ns:new_page|.test_page]]
|
||||
[[parent_ns:parallel_ns:new_page|.:test_page]]
|
||||
[[..test_page|..test_page]]
|
||||
[[..:test_page|..:test_page]]
|
||||
[[.:..:test_page|.:..:test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
|
||||
$newContent = rawWiki($this->otherBacklinkingId);
|
||||
$expectedContent = <<<EOT
|
||||
[[parent_ns:parallel_ns:new_page|$this->movedId]]
|
||||
[[$newId|:$this->movedId]]
|
||||
[[.current_ns:test_page|.current_ns:test_page]]
|
||||
[[.:current_ns:test_page|.:current_ns:test_page]]
|
||||
[[test_page|test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
}
|
||||
|
||||
|
||||
function test_move_page_to_parent_ns() {
|
||||
global $ID;
|
||||
|
||||
$newPagename = 'new_page';
|
||||
|
||||
$opts = array();
|
||||
$opts['page_ns'] = 'page';
|
||||
$opts['ns'] = getNS($ID);
|
||||
$opts['name'] = noNS($ID);
|
||||
$opts['newns'] = 'parent_ns';
|
||||
$opts['newname'] = $newPagename;
|
||||
$newId = $opts['newns'].':'.$opts['newname'];
|
||||
$this->movedToId = $opts['newns'].':'.$newPagename;
|
||||
|
||||
$this->pagemove->_pm_move_page($opts);
|
||||
|
||||
$newContent = rawWiki($newId);
|
||||
$expectedContent = <<<EOT
|
||||
[[parent_ns:current_ns:start|start]]
|
||||
[[parent_ns:current_ns:parallel_page|parallel_page]]
|
||||
[[parent_ns:current_ns:start|.:]]
|
||||
[[parent_ns:current_ns:start|..current_ns:]]
|
||||
[[parent_ns:current_ns:start|..:current_ns:]]
|
||||
[[parent_ns:parallel_ns:start|..parallel_ns:]]
|
||||
[[parent_ns:parallel_ns:start|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[start|..:..:parent_ns:]]
|
||||
[[new_page|parent_ns:new_page]]
|
||||
[[new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
|
||||
// page is moved to same NS as backlinking page (parent_ns)
|
||||
$newContent = rawWiki($this->parentBacklinkingId);
|
||||
$expectedContent = <<<EOT
|
||||
[[new_page|$this->movedId]]
|
||||
[[new_page|:$this->movedId]]
|
||||
[[new_page|.current_ns:test_page]]
|
||||
[[new_page|.:current_ns:test_page]]
|
||||
[[new_page|..parent_ns:current_ns:test_page]]
|
||||
[[test_page|test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
|
||||
$newContent = rawWiki($this->currentNsBacklinkingId);
|
||||
$expectedContent = <<<EOT
|
||||
[[parent_ns:new_page|$this->movedId]]
|
||||
[[$newId|:$this->movedId]]
|
||||
[[parent_ns:new_page|..current_ns:test_page]]
|
||||
[[parent_ns:new_page|..:current_ns:test_page]]
|
||||
[[parent_ns:new_page|test_page]]
|
||||
[[parent_ns:new_page|.test_page]]
|
||||
[[parent_ns:new_page|.:test_page]]
|
||||
[[..test_page|..test_page]]
|
||||
[[..:test_page|..:test_page]]
|
||||
[[.:..:test_page|.:..:test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
|
||||
$newContent = rawWiki($this->otherBacklinkingId);
|
||||
$expectedContent = <<<EOT
|
||||
[[parent_ns:new_page|$this->movedId]]
|
||||
[[$newId|:$this->movedId]]
|
||||
[[.current_ns:test_page|.current_ns:test_page]]
|
||||
[[.:current_ns:test_page|.:current_ns:test_page]]
|
||||
[[test_page|test_page]]
|
||||
[[new_page|new_page]]
|
||||
[[ftp://somewhere.com|ftp://somewhere.com]]
|
||||
[[http://somewhere.com|http://somewhere.com]]
|
||||
|
||||
[[start|start]]
|
||||
[[parallel_page|parallel_page]]
|
||||
[[.:|.:]]
|
||||
[[..current_ns:|..current_ns:]]
|
||||
[[..:current_ns:|..:current_ns:]]
|
||||
[[..parallel_ns:|..parallel_ns:]]
|
||||
[[..:parallel_ns:|..:parallel_ns:]]
|
||||
[[..:..:|..:..:]]
|
||||
[[..:..:parent_ns:|..:..:parent_ns:]]
|
||||
[[parent_ns:new_page|parent_ns:new_page]]
|
||||
[[parent_ns/new_page|parent_ns/new_page]]
|
||||
[[/start|/start]]
|
||||
EOT;
|
||||
$this->assertEqual($expectedContent, $newContent);
|
||||
}
|
||||
|
||||
|
||||
function test_move_ns_in_same_ns() {
|
||||
global $ID;
|
||||
|
||||
$newNamespace = 'new_ns';
|
||||
|
||||
$opts = array();
|
||||
$opts['page_ns'] = 'ns';
|
||||
$opts['newns'] = 'parent_ns'.':'.$newNamespace;
|
||||
$opts['newname'] = $newPagename;
|
||||
$this->movedToId = $opts['newns'].':'.$newPagename;
|
||||
|
||||
//$this->pagemove->_pm_move_recursive($opts);
|
||||
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
saveWikiText($this->movedId, '', 'removed');
|
||||
saveWikiText($this->movedToId, '', 'removed');
|
||||
saveWikiText($this->parentBacklinkingId, '', 'removed');
|
||||
saveWikiText($this->currentNsBacklinkingId, '', 'removed');
|
||||
saveWikiText($this->otherBacklinkingId, '', 'removed');
|
||||
saveWikiText($this->subNsPage, '', 'removed');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
965
lib/plugins/pagemove/admin.php
Normal file
965
lib/plugins/pagemove/admin.php
Normal file
@@ -0,0 +1,965 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin : Pagemove
|
||||
* Version : 0.10 (2010-06-17)
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author Gary Owen,
|
||||
*/
|
||||
|
||||
// must be run within Dokuwiki
|
||||
if (!defined('DOKU_INC')) die();
|
||||
|
||||
if (!defined('DOKU_LF')) define('DOKU_LF', "\n");
|
||||
if (!defined('DOKU_TAB')) define('DOKU_TAB', "\t");
|
||||
if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
||||
|
||||
require_once DOKU_PLUGIN.'admin.php';
|
||||
|
||||
require_once(DOKU_INC.'inc/search.php');
|
||||
|
||||
|
||||
class admin_plugin_pagemove extends DokuWiki_Admin_Plugin {
|
||||
|
||||
var $show_form = true;
|
||||
var $have_rights = true;
|
||||
var $locked_files = array();
|
||||
var $errors = array();
|
||||
var $opts = array();
|
||||
var $text = '';
|
||||
var $idsToDelete = array();
|
||||
|
||||
|
||||
function getMenuSort() { return FIXME; }
|
||||
function forAdminOnly() { return false; }
|
||||
|
||||
/**
|
||||
* function constructor
|
||||
*/
|
||||
function admin_plugin_pagemove(){
|
||||
// enable direct access to language strings
|
||||
$this->setupLocale();
|
||||
}
|
||||
|
||||
/**
|
||||
* return some info
|
||||
*/
|
||||
function getInfo(){
|
||||
return array(
|
||||
'author' => 'Gary Owen, Arno Puschmann, Christoph Jähnigen',
|
||||
'email' => 'pagemove@gmail.com',
|
||||
'date' => '2011-08-11',
|
||||
'name' => 'Pagemove',
|
||||
'desc' => $this->lang['desc'],
|
||||
'url' => 'http://www.dokuwiki.org/plugin:pagemove',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Only show the menu text for pages we can move or rename.
|
||||
*/
|
||||
function getMenuText() {
|
||||
global $INFO;
|
||||
global $ID;
|
||||
global $conf;
|
||||
|
||||
if( !$INFO['exists'] )
|
||||
return $this->lang['menu'].' ('.$this->lang['pm_notexist'].')';
|
||||
elseif( $ID == $conf['start'] )
|
||||
return $this->lang['menu'].' ('.$this->lang['pm_notstart'].')';
|
||||
elseif( !$INFO['writable'] )
|
||||
return $this->lang['menu'].' ('.$this->lang['pm_notwrite'].')';
|
||||
else
|
||||
return $this->lang['menu'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* output appropriate html
|
||||
*
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
*/
|
||||
function html() {
|
||||
global $lang;
|
||||
|
||||
ptln('<!-- Pagemove Plugin start -->');
|
||||
if( $this->show_form ) {
|
||||
ptln( $this->locale_xhtml('pagemove') );
|
||||
//We didn't get here from submit.
|
||||
if( $this->have_rights && count($this->locked_files) == 0 ) {
|
||||
$this->_pm_form();
|
||||
}
|
||||
else {
|
||||
ptln( '<p><strong>' );
|
||||
if ( !$this->have_rights ) {
|
||||
ptln( $this->errors[0].'<br>' );
|
||||
}
|
||||
$c = count($this->locked_files);
|
||||
if ( $c == 1 ) {
|
||||
ptln( $this->lang['pm_filelocked'].$this->locked_files[0].'<br>'.$this->lang['pm_tryagain'] );
|
||||
}
|
||||
elseif ( $c > 1 ) {
|
||||
ptln( $this->lang['pm_fileslocked'] );
|
||||
for ( $i = 0 ; $i < $c ; $i++ ) {
|
||||
ptln ( ($i > 0 ? ', ' : '').$this->locked_files[$i] );
|
||||
}
|
||||
ptln( '<br>'.$this->lang['pm_tryagain'] );
|
||||
}
|
||||
ptln ( '</strong></p>' );
|
||||
}
|
||||
}
|
||||
else {
|
||||
// display the moved/renamed page
|
||||
ptln( $this->render($this->text) );
|
||||
}
|
||||
ptln('<!-- Pagemove Plugin end -->');
|
||||
}
|
||||
|
||||
/**
|
||||
* show the move and/or rename a page form
|
||||
*
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
*/
|
||||
function _pm_form() {
|
||||
global $ID;
|
||||
global $lang;
|
||||
global $conf;
|
||||
|
||||
$ns = getNS($ID);
|
||||
$name = noNS($ID);
|
||||
|
||||
ptln(' <div align="center">');
|
||||
ptln(' <script language="Javascript">');
|
||||
ptln(' function setradio( group, choice ) {');
|
||||
ptln(' for ( i = 0 ; i < group.length ; i++ ) {');
|
||||
ptln(' if ( group[i].value == choice )');
|
||||
ptln(' group[i].checked = true;');
|
||||
ptln(' }');
|
||||
ptln(' }');
|
||||
ptln(' </script>');
|
||||
ptln(' <form name="frm" action="'.wl($ID).'" method="post">');
|
||||
// output hidden values to ensure dokuwiki will return back to this plugin
|
||||
ptln(' <input type="hidden" name="do" value="admin" />');
|
||||
ptln(' <input type="hidden" name="page" value="'.$this->getPluginName().'" />');
|
||||
ptln(' <input type="hidden" name="id" value="'.$ID.'" />');
|
||||
ptln(' <fieldset id="fieldset_page">');
|
||||
ptln(' <legend><input type="radio" name="page_ns" id="page_ns_0" value="page" CHECKED> '. $this->lang['pm_movepage'] .'</legend>');
|
||||
ptln(' <table border="0" id="table_page">');
|
||||
|
||||
//Show any errors
|
||||
if (count($this->errors) > 0) {
|
||||
ptln ('<tr><td bgcolor="red" colspan="3">');
|
||||
foreach($this->errors as $error) {
|
||||
ptln ($error.'<br>');
|
||||
}
|
||||
ptln ('</td></tr>');
|
||||
}
|
||||
//create a list of namespaces
|
||||
ptln( ' <tr><td align="right" nowrap><label><span>'.$this->lang['pm_targetns'].'</span></label></td>');
|
||||
ptln( ' <td width="25"><input type="radio" name="nsr" id="nsr_0" value="<old>" '.($_REQUEST['nsr'] != '<new>' ? 'CHECKED' : '').'></td>');
|
||||
ptln( ' <td><select name="ns_for_page" id="nsr_select" onChange="setradio(document.frm.nsr, \'<old>\');setradio(document.frm.page_ns, \'page\');">');
|
||||
$this->_pm_form_create_list_ns($ns);
|
||||
|
||||
ptln( " </select></td>\n </tr><tr>");
|
||||
|
||||
ptln( ' <td align="right" nowrap><label><span>'.$this->lang['pm_newtargetns'].'</span></label></td>');
|
||||
ptln( ' <td width="25"><input type="radio" name="nsr" id="nsr_1" value="<new>" '.($_REQUEST['nsr'] == '<new>' ? 'CHECKED' : '').'></td>');
|
||||
ptln( ' <td align="left" nowrap><input type="text" name="newns" id="newns" value="'.formtext($this->opts['newns']).'" class="edit" onClick="setradio(document.frm.nsr, \'<new>\');setradio(document.frm.page_ns, \'page\');" /></td>');
|
||||
ptln( ' </tr>');
|
||||
ptln( ' <tr>');
|
||||
ptln( ' <td align="right" nowrap><label><span>'.$this->lang['pm_newname'].'</span></label></td>');
|
||||
ptln(' <td width="25"></td>'); //<input type="radio" name="pageradio" value="<page>" '.($_REQUEST['pageradio']!= '<namespace>' ? 'CHECKED' : '').'>
|
||||
ptln( ' <td align="left" nowrap><input type="text" name="pagename" id="pagename" value="'.formtext(isset($this->opts['newname']) ? $this->opts['newname'] : $name).'" class="edit" onClick="setradio(document.frm.page_ns, \'page\');" /></td>');
|
||||
ptln( ' </tr>');
|
||||
ptln( ' </tr>');
|
||||
ptln( ' </tr>');
|
||||
ptln( ' </table>');
|
||||
ptln( ' </fieldset>');
|
||||
|
||||
ptln(' <br>');
|
||||
ptln(' <fieldset id="fieldset_ns" >');
|
||||
ptln(' <legend><input type="radio" name="page_ns" id="page_ns_1" value="ns"> '. $this->lang['pm_movens'] .'</legend>');
|
||||
ptln(' <table border="0" id="table_ns">');
|
||||
ptln( ' <tr><td align="right" nowrap><label><span>'.$this->lang['pm_targetns'].'</span></label></td>');
|
||||
ptln( ' <td><select name="ns" id="ns_select" onChange="setradio(document.frm.page_ns, \'ns\');">');
|
||||
$this->_pm_form_create_list_ns($ns);
|
||||
ptln( " </select></td>\n </tr>");
|
||||
ptln( ' <tr>');
|
||||
ptln( ' <td align="right" nowrap><label><span>'.$this->lang['pm_newnsname'].'</span></label></td>');
|
||||
ptln( ' <td align="left" nowrap><input type="text" name="namespacename" id="namespacename" value="'.formtext(isset($this->opts['newnsname']) ? $this->opts['newnsname'] : $this->opts['nsname']).'" class="edit" onClick="setradio(document.frm.page_ns, \'ns\');" /></td>');
|
||||
ptln( ' </tr>');
|
||||
ptln( ' </table>');
|
||||
ptln(' </fieldset>');
|
||||
ptln( '<br><center><input type="submit" value="'.formtext($this->lang['pm_submit']).'" class="button" /><input type="button" value="'.$this->lang['pm_preview'].'" class="button" onClick="Javascript:preview();"/></center>');
|
||||
ptln( '</form>');
|
||||
|
||||
ptln('<font id="preview_output"></font>');
|
||||
|
||||
ptln(' <script language="Javascript">');
|
||||
ptln(" table_page_width = document.getElementById('table_page').offsetWidth;");
|
||||
ptln(" table_ns_width = document.getElementById('table_ns').offsetWidth;");
|
||||
ptln(" max_width = Math.max(table_page_width,table_ns_width)+'px';");
|
||||
ptln(" document.getElementById('fieldset_page').style.width = max_width;");
|
||||
ptln(" document.getElementById('fieldset_ns').style.width = max_width;");
|
||||
|
||||
ptln("function preview(){");
|
||||
ptln("if(document.getElementById('page_ns_0').checked == true)");
|
||||
ptln("{");
|
||||
ptln(" if(document.getElementById('nsr_0').checked == true)");
|
||||
ptln(" {");
|
||||
ptln(" preview_text = \"".$ID . $this->lang['pm_previewpage']. " \" + document.getElementById('nsr_select').value + (document.getElementById('nsr_select').value==':'? '' : ':') + document.getElementById('pagename').value;");
|
||||
ptln(" }");
|
||||
ptln(" else");
|
||||
ptln(" {");
|
||||
ptln(" preview_text = \"".$ID . $this->lang['pm_previewpage']. " \" + document.getElementById('newns').value + ':' + document.getElementById('pagename').value;");
|
||||
ptln(" }");
|
||||
ptln("}");
|
||||
ptln("else{");
|
||||
ptln(" preview_text = \"". sprintf($this->lang['pm_previewns'], $ns). " \" + document.getElementById('ns_select').value + (document.getElementById('ns_select').value==':'? '' : ':') + document.getElementById('namespacename').value;");
|
||||
ptln("}");
|
||||
ptln("document.getElementById('preview_output').innerHTML = preview_text;");
|
||||
ptln("");
|
||||
ptln("}");
|
||||
ptln(" </script>");
|
||||
|
||||
ptln( '</div>');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* create a list of namespaces for the html form
|
||||
*
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
* @author Arno Puschmann (bin out of _pm_form)
|
||||
*/
|
||||
function _pm_form_create_list_ns($ns) {
|
||||
global $conf;
|
||||
|
||||
$namesp = array( 0 => '' ); //Include root
|
||||
search($namesp, $conf['datadir'], 'search_namespaces', array());
|
||||
sort($namesp);
|
||||
foreach($namesp as $row) {
|
||||
if ( auth_quickaclcheck($row['id'].':*') >= AUTH_CREATE || $row['id'] == $ns ) {
|
||||
ptln ( ' <option value="'.
|
||||
($row['id'] ? $row['id'] : ':').
|
||||
($_REQUEST['ns'] ?
|
||||
(($row['id'] ? $row['id'] : ":") == $_REQUEST['ns'] ? '" SELECTED>' : '">') :
|
||||
($row['id'] == $ns ? '" SELECTED>' : '">') ).
|
||||
($row['id'] ? $row['id'].':' : ": ".$this->lang['pm_root']).
|
||||
($row['id'] == $ns ? ' '.$this->lang['pm_current'] : '').
|
||||
"</option>" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* handle user request
|
||||
*
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
*/
|
||||
function handle() {
|
||||
|
||||
global $conf;
|
||||
global $lang;
|
||||
global $ID;
|
||||
global $INFO;
|
||||
global $ACT;
|
||||
|
||||
// check we have rights to move this document
|
||||
if( !$INFO['exists'] ) {
|
||||
$this->have_rights = false;
|
||||
$this->errors[] = $this->lang['pm_notexist'];
|
||||
return;
|
||||
}
|
||||
// do not move start page
|
||||
if( $ID == $conf['start'] ) {
|
||||
$this->have_rights = false;
|
||||
$this->errors[] = $this->lang['pm_notstart'];
|
||||
return;
|
||||
}
|
||||
|
||||
// was a form send?
|
||||
if (! array_key_exists('page_ns', $_REQUEST)) {
|
||||
// @fixme do something more intelligent like showing in message
|
||||
return;
|
||||
}
|
||||
|
||||
// extract namespace and document name from ID
|
||||
$this->opts['ns'] = getNS($ID);
|
||||
$this->opts['name'] = noNS($ID);
|
||||
$this->opts['page_ns'] = $_REQUEST['page_ns'];
|
||||
|
||||
// check the input for completeness
|
||||
if( $this->opts['page_ns'] == 'ns' ) {
|
||||
// @todo Target namespace needn't be new (check pages for overwrite!)
|
||||
if( $_REQUEST['namespacename'] == '' ) {
|
||||
$this->errors[] = $this->lang['pm_emptynamespace'];
|
||||
return;
|
||||
}
|
||||
$this->opts['newnsname'] = $_REQUEST['namespacename'];
|
||||
if ( cleanID($this->opts['newnsname']) == '' ) {
|
||||
$this->errors[] = $this->lang['pm_badns'];
|
||||
return;
|
||||
}
|
||||
if ($_REQUEST['ns'] == ':') {
|
||||
$this->opts['newns'] = $this->opts['newnsname'];
|
||||
}
|
||||
else {
|
||||
$this->opts['newns'] = $_REQUEST['ns'].':'.$this->opts['newnsname'];
|
||||
}
|
||||
|
||||
// check the NS if a recursion is needed
|
||||
// @fixme Is this still needed?
|
||||
$pagelist = array();
|
||||
$needrecursion = false;
|
||||
$nsRelPath = utf8_encodeFN(str_replace(':', '/', $this->opts['ns']));
|
||||
search($items, $conf['datadir'], 'search_index', '', $nsRelPath);
|
||||
foreach ($items as $item) {
|
||||
if ($item['type'] == 'd') {
|
||||
$needrecursion = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$nsRelPath = utf8_encodeFN(str_replace(':', '/', $this->opts['ns']));
|
||||
$this->_pm_move_recursive($nsRelPath, $this->opts);
|
||||
|
||||
$newNsAbsPath = $conf['datadir'].'/'.str_replace(':', '/', $this->opts['newns']);
|
||||
$this->_pm_disable_cache($newNsAbsPath);
|
||||
}
|
||||
elseif( $this->opts['page_ns'] == 'page' ) {
|
||||
if( $_REQUEST['pagename'] == '' ) {
|
||||
$this->errors[] = $this->lang['pm_emptypagename'];
|
||||
return;
|
||||
}
|
||||
$this->opts['newname'] = $_REQUEST['pagename'];
|
||||
// check that the pagename is valid
|
||||
if ( cleanID($this->opts['newname']) == '' ) {
|
||||
$this->errors[] = $this->lang['pm_badname'];
|
||||
return;
|
||||
}
|
||||
|
||||
if ($_REQUEST['nsr'] == '<old>') {
|
||||
$this->opts['newns'] = ($_REQUEST['ns_for_page'] == ':' ? '' : $_REQUEST['ns_for_page']);
|
||||
}
|
||||
elseif ($_REQUEST['nsr'] =='<new>') {
|
||||
// if a new namespace was requested, check and use it
|
||||
if ($_REQUEST['newns'] != '') {
|
||||
$this->opts['newns'] = $_REQUEST['newns'];
|
||||
// check that the new namespace is valid
|
||||
if ( cleanID($this->opts['newns']) == '' ) {
|
||||
$this->errors[] = $this->lang['pm_badns'];
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->errors[] = $this->lang['pm_badns'];
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->errors[] = $this->lang['pm_fatal'];
|
||||
return;
|
||||
}
|
||||
|
||||
$this->_pm_move_page($this->opts);
|
||||
|
||||
// @todo if the namespace is now empty, delete it
|
||||
|
||||
// Set things up to display the new page.
|
||||
io_saveFile($conf['cachedir'].'/purgefile', time());
|
||||
$ID = $opts['new_id'];
|
||||
$ACT = 'show';
|
||||
$INFO = pageinfo();
|
||||
$this->show_form = false;
|
||||
}
|
||||
else {
|
||||
$this->errors[] = $this->lang['pm_fatal'];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// only go on if no errors occured and inputs are not empty
|
||||
if (count($this->errors) != 0 ) {
|
||||
return;
|
||||
}
|
||||
// delete empty namespaces if possible
|
||||
// @fixme does not work like that
|
||||
foreach ($this->idsToDelete as $idToDelete) {
|
||||
io_sweepNS($idToDelete);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* touch every file which was moved, because of cached backlinks inside of moved namespace
|
||||
*
|
||||
* @author Arno Puschmann 2010-01-29
|
||||
* @param $pathToSearch
|
||||
* @return unknown_type
|
||||
*/
|
||||
function _pm_disable_cache($pathToSearch) {
|
||||
$files = scandir($pathToSearch);
|
||||
if( !empty($files) ) {
|
||||
foreach($files as $file) {
|
||||
if( $file == '.' || $file == '..' ) continue;
|
||||
if( is_dir($pathToSearch.'/'.$file) ) {
|
||||
$this->_pm_disable_cache($pathToSearch.'/'.$file);
|
||||
}
|
||||
else {
|
||||
if( preg_match('#\.txt$#', $file) ) {
|
||||
touch($pathToSearch.'/'.$file, time()+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Bastian Wolf
|
||||
* @param $pathToSearch
|
||||
* @param $opts
|
||||
* @return unknown_type
|
||||
*/
|
||||
function _pm_move_recursive($pathToSearch, $opts) {
|
||||
global $ID;
|
||||
global $conf;
|
||||
|
||||
$pagelist = array();
|
||||
search($pagelist, $conf['datadir'], 'search_index', '', $pathToSearch);
|
||||
|
||||
foreach ($pagelist as $page) {
|
||||
if ($page['type'] == 'd') {
|
||||
$pathToSearch = utf8_encodeFN(str_replace(':', '/', $page['id']));
|
||||
// @fixme shouldn't be necessary as ID already exists
|
||||
io_createNamespace($page['id']);
|
||||
// NS to move is this one
|
||||
$nsOpts = $opts;
|
||||
$nsOpts['ns'] = $page['id'];
|
||||
// target NS is this folder under the current target NS
|
||||
$thisFolder = end(explode(':', $page['id']));
|
||||
$nsOpts['newns'] .= ':'.$thisFolder;
|
||||
array_push($this->idsToDelete, $page['id']);
|
||||
// Recursion
|
||||
$this->_pm_move_recursive($pathToSearch, $nsOpts);
|
||||
}
|
||||
elseif ($page['type'] == 'f') {
|
||||
$ID = $page['id'];
|
||||
$pageOpts = $opts;
|
||||
$pageOpts['ns'] = getNS($ID);
|
||||
$pageOpts['name'] = noNS($ID);
|
||||
$pageOpts['newname'] = noNS($ID);
|
||||
$this->_pm_move_page($pageOpts);
|
||||
}
|
||||
else {
|
||||
$this->errors[] = $this->lang['pm_unknown_file_type'];
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* move page
|
||||
*
|
||||
* @author Gary Owen <gary@isection.co.uk>, modified by Kay Roesler
|
||||
*
|
||||
* @param array $opts
|
||||
*/
|
||||
function _pm_move_page($opts) {
|
||||
|
||||
global $conf;
|
||||
global $lang;
|
||||
global $ID;
|
||||
global $INFO;
|
||||
global $ACT;
|
||||
|
||||
// Check we have rights to move this document
|
||||
if ( !$INFO['exists']) {
|
||||
$this->have_rights = false;
|
||||
$this->errors[] = $this->lang['pm_notexist'];
|
||||
return;
|
||||
}
|
||||
if ( $ID == $conf['start']) {
|
||||
$this->have_rights = false;
|
||||
$this->errors[] = $this->lang['pm_notstart'];
|
||||
return;
|
||||
}
|
||||
if ( auth_quickaclcheck($ID) < AUTH_EDIT ) {
|
||||
$this->have_rights = false;
|
||||
$this->errors[] = $this->lang['pm_norights'];
|
||||
return;
|
||||
}
|
||||
|
||||
// Check file is not locked
|
||||
if (checklock($ID)) {
|
||||
$this->locked_files[] = $ID;
|
||||
}
|
||||
|
||||
// get all backlink information
|
||||
$backlinksById = array();
|
||||
$this->_pm_search($backlinksById, $conf['datadir'], '_pm_search_backlinks', $opts);
|
||||
|
||||
// Check we have edit rights on the backlinks and they are not locked
|
||||
foreach($backlinksById as $backlinkingId=>$backlinks) {
|
||||
if (auth_quickaclcheck($backlinkingId) < AUTH_EDIT) {
|
||||
$this->have_rights = false;
|
||||
}
|
||||
if (checklock($backlinkingId)) {
|
||||
$this->locked_files[] = $backlinkingId;
|
||||
}
|
||||
}
|
||||
|
||||
// Assemble fill document name and path
|
||||
$opts['new_id'] = cleanID($opts['newns'].':'.$opts['newname']);
|
||||
$opts['new_path'] = wikiFN($opts['new_id']);
|
||||
|
||||
// Has the document name and/or namespace changed?
|
||||
if ( $opts['newns'] == $opts['ns'] && $opts['newname'] == $opts['name'] ) {
|
||||
$this->errors[] = $this->lang['pm_nochange'];
|
||||
return;
|
||||
}
|
||||
// Check the page does not already exist
|
||||
if ( @file_exists($opts['new_path']) ) {
|
||||
$this->errors[] = sprintf($this->lang['pm_existing'], $opts['newname'],
|
||||
($opts['newns'] == '' ? $this->lang['pm_root'] : $opts['newns']));
|
||||
return;
|
||||
}
|
||||
|
||||
if ( count($this->errors) != 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* End of init (checks)
|
||||
*/
|
||||
|
||||
// Open the old document and change forward links
|
||||
lock($ID);
|
||||
$this->text = io_readFile(wikiFN($ID), True);
|
||||
|
||||
// Get an array of forward links from the document
|
||||
$forward = $this->_pm_getforwardlinks($ID);
|
||||
|
||||
// Change the forward links
|
||||
foreach($forward as $lnk => $lid) {
|
||||
// Get namespace of target document
|
||||
$tns = getNS($lid);
|
||||
$tname = noNS($lid);
|
||||
// Form new document ID for the target
|
||||
|
||||
$matches = array();
|
||||
if ( $tns == $opts['newns'] ) {
|
||||
// Document is in same namespace as target
|
||||
$this->_pm_updatelinks($this->text, array($lnk => $tname));
|
||||
}
|
||||
elseif ( preg_match('#^'.$opts['newns'].':(.*:)$#', $tns, $matches) ) {
|
||||
// Target is in a sub-namespace
|
||||
$this->_pm_updatelinks($this->text, array($lnk => '.:'.$matches[1].':'.$tname));
|
||||
}
|
||||
elseif ( $tns == "" ) {
|
||||
// Target is in root namespace
|
||||
$this->_pm_updatelinks($this->text, array($lnk => $lid ));
|
||||
}
|
||||
else {
|
||||
$this->_pm_updatelinks($this->text, array($lnk => $lid ));
|
||||
}
|
||||
}
|
||||
|
||||
if ( $opts['ns'] != $opts['newns'] ) {
|
||||
// Change media links when moving between namespaces
|
||||
$media = $this->_pm_getmedialinks($ID);
|
||||
foreach($media as $lnk => $lid) {
|
||||
$tns = getNS($lid);
|
||||
$tname = noNS($lid);
|
||||
// Form new document id for the target
|
||||
$matches = array();
|
||||
if ( $tns == $opts['newns'] ) {
|
||||
// Document is in same namespace as target
|
||||
$this->_pm_updatemedialinks($this->text, $lnk, $tname );
|
||||
}
|
||||
elseif ( preg_match('#^'.$opts['newns'].':(.*:)$#', $tns, $matches) ) {
|
||||
// Target is in a sub-namespace
|
||||
$this->_pm_updatemedialinks($this->text, $lnk, '.:'.$matches[1].':'.$tname );
|
||||
}
|
||||
elseif ( $tns == "" ) {
|
||||
// Target is in root namespace
|
||||
$this->_pm_updatemedialinks($this->text, $lnk, ':'.$lid );
|
||||
}
|
||||
else {
|
||||
$this->_pm_updatemedialinks($this->text, $lnk, $lid );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Move the Subscriptions & Indexes
|
||||
$this->_pm_movemeta('metadir', '/^'.$opts['name'].'\.\w*?$/', $opts);
|
||||
|
||||
// Save the updated document in its new location
|
||||
if ($opts['ns'] == $opts['newns']) {
|
||||
$lang_key = 'pm_renamed';
|
||||
}
|
||||
elseif ( $opts['name'] == $opts['newname'] ) {
|
||||
$lang_key = 'pm_moved';
|
||||
}
|
||||
else {
|
||||
$lang_key = 'pm_move_rename';
|
||||
}
|
||||
$summary = sprintf($this->lang[$lang_key], $ID, $opts['new_id']);
|
||||
saveWikiText($opts['new_id'], $this->text, $summary);
|
||||
|
||||
// Delete the orginal file
|
||||
if (@file_exists(wikiFN($opts['new_id']))) {
|
||||
saveWikiText($ID, '', $this->lang['pm_delete'] );
|
||||
}
|
||||
|
||||
// Loop through backlinks
|
||||
foreach($backlinksById as $backlinkingId => $backlinks) {
|
||||
$this->_pm_updatebacklinks($backlinkingId, $backlinks, $opts, $brackets);
|
||||
}
|
||||
|
||||
// Move the old revisions
|
||||
$this->_pm_movemeta('olddir', '/^'.$opts['name'].'\.[0-9]{10}\.txt(\.gz)?$/', $opts);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Modify the links in a backlink.
|
||||
*
|
||||
* @param id Page ID of the backlinking page
|
||||
* @param links Array of page names on this page.
|
||||
*
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
*/
|
||||
function _pm_updatebacklinks($backlinkingId, $links, $opts, &$brackets) {
|
||||
global $ID;
|
||||
|
||||
// Get namespace of document we are editing
|
||||
$bns = getNS($backlinkingId);
|
||||
|
||||
// Create a clean version of the new name
|
||||
$cleanname = cleanID($opts['newname']);
|
||||
|
||||
// Open backlink
|
||||
lock($backlinkingId);
|
||||
$text = io_readFile(wikiFN($backlinkingId),True);
|
||||
|
||||
// Form new document ID for this backlink
|
||||
$matches = array();
|
||||
// new page is in same namespace as backlink
|
||||
if ( $bns == $opts['newns'] ) {
|
||||
$replacementNamespace = '';
|
||||
}
|
||||
// new page is in sub-namespace of backlink
|
||||
elseif ( preg_match('#^'.$bns.':(.*)$#', $opts['newns'], $matches) ) {
|
||||
$replacementNamespace = '.:'.$matches[1].':';
|
||||
}
|
||||
// not same or sub namespace: use absolute reference
|
||||
else {
|
||||
$replacementNamespace = $opts['newns'].':';
|
||||
}
|
||||
|
||||
// @fixme stupid: for each page get original backlink and its replacement
|
||||
$matches = array();
|
||||
// get an array of: backlinks => replacement
|
||||
$oid = array();
|
||||
if ( $bns == $opts['ns'] ) {
|
||||
// old page was in same namespace as backlink
|
||||
foreach ( $links as $link ) {
|
||||
$oid[$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
$oid['.:'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
$oid['.'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
}
|
||||
}
|
||||
if ( preg_match('#^'.$bns.':(.*)$#', $opts['ns'], $matches) ) {
|
||||
// old page was in sub namespace of backlink namespace
|
||||
foreach ( $links as $link ) {
|
||||
$oid['.:'.$matches[1].':'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
$oid['.'.$matches[1].':'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
}
|
||||
}
|
||||
if ( preg_match('#^'.$opts['ns'].':(.*)$#', $bns , $matches) && $opts['page_ns'] == 'page' ) {
|
||||
// old page was in upper namespace of backlink
|
||||
foreach ( $links as $link ) {
|
||||
$oid['..:'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
$oid['..'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
$oid['.:..:'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
}
|
||||
}
|
||||
// replace all other links
|
||||
foreach ( $links as $link ) {
|
||||
// absolute links
|
||||
$oid[$opts['ns'].':'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
//$oid['.:'.$opts['ns'].':'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
|
||||
// check backwards relative links
|
||||
$relLink = $link;
|
||||
$relDots = '..';
|
||||
$backlinkingNamespaceCount = count(explode(':', $bns));
|
||||
$oldNamespaces = explode(':', $opts['ns'], $backlinkingNamespaceCount);
|
||||
$oldNamespaceCount = count($oldNamespaces);
|
||||
if ($backlinkingNamespaceCount > $oldNamespaceCount) {
|
||||
$levelDiff = $backlinkingNamespaceCount - $oldNamespaceCount;
|
||||
for ($i = 0; $i < $levelDiff; $i++) {
|
||||
$relDots .= ':..';
|
||||
}
|
||||
}
|
||||
|
||||
foreach (array_reverse($oldNamespaces) as $nextUpperNs) {
|
||||
$relLink = $nextUpperNs.':'.$relLink;
|
||||
foreach (array($relDots.$relLink, $relDots.':'.$relLink) as $dottedRelLink) {
|
||||
$absLink=$dottedRelLink;
|
||||
resolve_pageid($bns, $absLink, $exists);
|
||||
if ($absLink == $ID) {
|
||||
$oid[$dottedRelLink] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
}
|
||||
}
|
||||
$relDots = '..:'.$relDots;
|
||||
}
|
||||
|
||||
//$oid['..:'.$opts['ns'].':'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
//$oid['..'.$opts['ns'].':'.$link] = $replacementNamespace.(($cleanname == cleanID($link)) ? $link : $opts['newname']);
|
||||
}
|
||||
|
||||
// Make the changes
|
||||
$this->_pm_updatelinks($text, $oid);
|
||||
|
||||
// Save backlink and release lock
|
||||
saveWikiText($backlinkingId, $text, sprintf($this->lang['pm_linkchange'], $ID, $opts['new_id']));
|
||||
unlock($backlinkingId);
|
||||
}
|
||||
|
||||
/**
|
||||
* modify the links using the pairs in $links
|
||||
*
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
*/
|
||||
function _pm_updatelinks(&$text, $links) {
|
||||
foreach( $links as $old => $new ) {
|
||||
$text = preg_replace( '#\[\[:?' . $old . '((\]\])|[\|\#])#i', '[[' . $new . '\1', $text);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* modify the medialinks from namepspace $old to namespace $new
|
||||
*
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
*/
|
||||
function _pm_updatemedialinks(&$text, $old, $new) {
|
||||
// Question marks in media links need some extra handling
|
||||
$text = preg_replace('#\{\{' . $old . '([\?\|]|(\}\}))#i', '{{' . $new . '\1', $text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get forward links in a given page which need to be changed.
|
||||
*
|
||||
* Not changed: local sections, absolute links
|
||||
* Changed need to be
|
||||
*
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
*/
|
||||
function _pm_getforwardlinks($id) {
|
||||
$data = array();
|
||||
$text = io_readfile(wikiFN($id));
|
||||
|
||||
// match all links
|
||||
// FIXME may be incorrect because of code blocks
|
||||
// TODO CamelCase isn't supported, too
|
||||
preg_match_all('#\[\[(.+?)\]\]#si', $text, $matches, PREG_SET_ORDER);
|
||||
foreach($matches as $match) {
|
||||
// ignore local headings [[#some_heading]]
|
||||
if ( preg_match('/^#/', $match[1])) continue;
|
||||
|
||||
// get ID from link and discard most non wikilinks
|
||||
list($mid) = split('[\|#]', $match[1], 2);
|
||||
// ignore links with URL schema prefix ([[prefix://]])
|
||||
if(preg_match('#^\w+://#', $mid)) continue;
|
||||
// if(preg_match('#^(https?|telnet|gopher|file|wais|ftp|ed2k|irc)://#',$mid)) continue;
|
||||
// inter-wiki link
|
||||
if(preg_match('#\w+>#', $mid)) continue;
|
||||
// baselink ([[/some_link]])
|
||||
if(preg_match('#^/#', $mid)) continue;
|
||||
// email addresses
|
||||
if(strpos($mid, '@') !== FALSE) continue;
|
||||
// ignore absolute links
|
||||
if( strpos($mid, ':') === 0 ) continue;
|
||||
|
||||
$absoluteMatchId = $mid;
|
||||
$exists = FALSE;
|
||||
resolve_pageid(getNS($id), $absoluteMatchId, $exists);
|
||||
if($absoluteMatchId != FALSE) {
|
||||
$data[$mid] = $absoluteMatchId;
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get media links in a given page
|
||||
*
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
*/
|
||||
function _pm_getmedialinks($id) {
|
||||
$data = array();
|
||||
$text = io_readfile(wikiFN($id));
|
||||
// match all links
|
||||
// FIXME may be incorrect because of code blocks
|
||||
// TODO CamelCase isn't supported, too
|
||||
preg_match_all('#{{(.[^>]+?)}}#si', $text, $matches, PREG_SET_ORDER);
|
||||
foreach($matches as $match) {
|
||||
// get ID from link and discard most non wikilinks
|
||||
list($mid) = split('(\?|\|)', $match[1], 2);
|
||||
$mns = getNS($mid);
|
||||
$lnk = $mid;
|
||||
|
||||
// namespace starting with "." - prepend current namespace
|
||||
if(strpos($mns, '.')===0) {
|
||||
$mid = getNS($id).':'.substr($mid, 1);
|
||||
}
|
||||
elseif($mns === FALSE){
|
||||
// no namespace in link? add current
|
||||
$mid = getNS($id) . ':' . $mid;
|
||||
}
|
||||
$data[$lnk] = preg_replace('#:+#', ':', $mid);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* move meta files (Old Revs, Subscriptions, Meta, etc)
|
||||
*
|
||||
* This function meta files between directories
|
||||
*
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
*/
|
||||
function _pm_movemeta($dir, $regex, $opts) {
|
||||
global $conf;
|
||||
|
||||
$old_path = $conf[$dir].'/'.str_replace(':','/',$opts['ns']).'/';
|
||||
$new_path = $conf[$dir].'/'.str_replace(':','/',$opts['newns']).'/';
|
||||
$dh = @opendir($old_path);
|
||||
if($dh) {
|
||||
while(($file = readdir($dh)) !== false) {
|
||||
// skip hidden files and upper dirs
|
||||
if(preg_match('/^\./',$file)) continue;
|
||||
if(is_file($old_path.$file) and preg_match($regex,$file)) {
|
||||
io_mkdir_p($new_path);
|
||||
io_rename($old_path.$file,$new_path.str_replace($opts['name'], $opts['newname'], $file));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* recurse directory
|
||||
*
|
||||
* This function recurses into a given base directory
|
||||
* and calls the supplied function for each file and directory
|
||||
*
|
||||
* @author Andreas Gohr <andi@splitbrain.org>
|
||||
* @param array $data Found data is collected
|
||||
* @param string $base Directory to be searched in
|
||||
* @param string $func Name of real search function
|
||||
* @param array $opts Options to the search functions
|
||||
* @param string $dir Current relative directory
|
||||
* @param integer $lvl Level of recursion
|
||||
*/
|
||||
function _pm_search(&$data, $base, $func, $opts, $dir='' ,$lvl=1) {
|
||||
$dirs = array();
|
||||
$files = array();
|
||||
|
||||
// read in directories and files
|
||||
$dh = @opendir($base.'/'.$dir);
|
||||
if(!$dh) return;
|
||||
while(($file = readdir($dh)) !== false) {
|
||||
// skip hidden files and upper dirs
|
||||
if(preg_match('/^\./',$file)) continue;
|
||||
if(is_dir($base.'/'.$dir.'/'.$file)) {
|
||||
$dirs[] = $dir.'/'.$file;
|
||||
continue;
|
||||
}
|
||||
$files[] = $dir.'/'.$file;
|
||||
}
|
||||
closedir($dh);
|
||||
sort($files);
|
||||
sort($dirs);
|
||||
|
||||
// give directories to userfunction then recurse
|
||||
foreach($dirs as $dir) {
|
||||
if ($this->$func($data, $base, $dir, 'd', $lvl, $opts)) {
|
||||
$this->_pm_search($data, $base, $func, $opts, $dir, $lvl+1);
|
||||
}
|
||||
}
|
||||
// now handle the files
|
||||
foreach($files as $file) {
|
||||
$this->$func($data, $base, $file, 'f', $lvl, $opts);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for backlinks to a given page
|
||||
*
|
||||
* $opts['ns'] namespace of the page
|
||||
* $opts['name'] name of the page without namespace
|
||||
*
|
||||
* @author Andreas Gohr <andi@splitbrain.org>
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
*/
|
||||
function _pm_search_backlinks(&$data, $base, $file, $type, $lvl, $opts) {
|
||||
// we do nothing with directories
|
||||
if($type == 'd') return true;
|
||||
// only search txt files
|
||||
if(!preg_match('#\.txt$#', $file)) return true;
|
||||
|
||||
$text = io_readfile($base.'/'.$file);
|
||||
// absolute search ID
|
||||
// $absSearchedId = cleanID($opts['ns'].':'.$opts['name']);
|
||||
$absSearchedId = $opts['name'];
|
||||
resolve_pageid($opts['ns'], $absSearchedId, $exists);
|
||||
|
||||
// construct current namespace
|
||||
$cid = pathID($file);
|
||||
$cns = getNS($cid);
|
||||
|
||||
// match all links
|
||||
// FIXME may be incorrect because of code blocks
|
||||
// FIXME CamelCase isn't supported, too
|
||||
preg_match_all('#\[\[(.+?)\]\]#si', $text, $matches, PREG_SET_ORDER);
|
||||
foreach($matches as $match) {
|
||||
// get ID from link and discard most non wikilinks
|
||||
list($matchLink) = split('[\|#]', $match[1], 2);
|
||||
// all URLs with a scheme
|
||||
if(preg_match('#^\w+://#', $matchLink)) continue;
|
||||
// if(preg_match('#^(https?|telnet|gopher|file|wais|ftp|ed2k|irc)://#',$matchLink)) continue;
|
||||
// baselinks
|
||||
if(preg_match('#^/#', $matchLink)) continue;
|
||||
// inter-wiki links
|
||||
if(preg_match('#\w+>#', $matchLink)) continue;
|
||||
// email addresses
|
||||
if(strpos($matchLink, '@') !== FALSE) continue;
|
||||
|
||||
// get the ID the link refers to by cleaning and resolving it
|
||||
$matchId = cleanID($matchLink);
|
||||
resolve_pageid($cns, $matchId, $exists);
|
||||
$matchPagename = ltrim(noNS($matchId), '.:');
|
||||
|
||||
// only collect IDs not in collected $data already
|
||||
if ($matchId == $absSearchedId // matching link refers to the searched ID
|
||||
&& (! array_key_exists($cid, $data) // not in $data already
|
||||
|| empty($data[$cid])
|
||||
|| ! in_array($matchPagename, $data[$cid]))) {
|
||||
// @fixme return original link and its replacement
|
||||
$data[$cid][] = $matchPagename;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
41
lib/plugins/pagemove/lang/cs/lang.php.txt
Normal file
41
lib/plugins/pagemove/lang/cs/lang.php.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
<php>
|
||||
<?php
|
||||
/**
|
||||
* czech language file
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author Tomáš Borland Valenta
|
||||
*/
|
||||
|
||||
// settings must be present and set appropriately for the language
|
||||
$lang['encoding'] = 'utf-8';
|
||||
$lang['direction'] = 'ltr';
|
||||
|
||||
// for admin plugins, the menu prompt to be displayed in the admin menu
|
||||
// if set here, the plugin doesn't need to override the getMenuText() method
|
||||
$lang['menu'] = 'Přesun/přejmenování stránky';
|
||||
$lang['desc'] = 'Plugin pro přesun/přejmenování stránku';
|
||||
|
||||
$lang['pm_notexist'] = 'Toto téma ještě neexistuje';
|
||||
$lang['pm_notstart'] = 'Titulní stránku nelze přesouvat ani přejmenovat';
|
||||
$lang['pm_notwrite'] = 'Nemáte dostatečná oprávnění pro úpravu stránky';
|
||||
$lang['pm_badns'] = 'Neplatný název jmenného prostoru';
|
||||
$lang['pm_badname'] = 'Neplatný název stránky';
|
||||
$lang['pm_nochange'] = 'Jméno stránky a jmenného prostoru se nezměnilo';
|
||||
$lang['pm_existing1'] = 'Stránka ';
|
||||
$lang['pm_existing2'] = ' již existuje v ';
|
||||
$lang['pm_root'] = '[Kořen]';
|
||||
$lang['pm_current'] = '(Současný)';
|
||||
$lang['pm_movedfrom'] = 'Stránka přesunuta z ';
|
||||
$lang['pm_movedto'] = 'Stránka přesunuta do ';
|
||||
$lang['pm_norights'] = 'Nemáte právo editovat jednu nebo více odkazujících stránek';
|
||||
$lang['pm_tryagain'] = 'Zkuste prosím znovu později';
|
||||
$lang['pm_filelocked'] = 'Tento soubor je uzamčen - ';
|
||||
$lang['pm_fileslocked'] = 'Tyto soubory jsou uzamčeny - ';
|
||||
$lang['pm_linkchange1'] = 'Odkazy na ';
|
||||
$lang['pm_linkchange2'] = ' změněny na ';
|
||||
$lang['pm_newname'] = 'Nový název stránky :';
|
||||
$lang['pm_targetns'] = 'Cílový jmenný prostor :';
|
||||
$lang['pm_submit'] = 'Potvrdit';
|
||||
?>
|
||||
</php>
|
11
lib/plugins/pagemove/lang/cs/pagemove.txt.txt
Normal file
11
lib/plugins/pagemove/lang/cs/pagemove.txt.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
====== Pagemove ======
|
||||
|
||||
Pomocí tohoto pluginu lze přesunout nebo přejmenovat aktuální stránku. Platí však jistá omezení:
|
||||
|
||||
* Nelze přesouvat titulní stránku.
|
||||
* Musíte mít práva na danou stránku a na všechny, které se na ní odkazují.
|
||||
* Tato stránka a na ni odkazující stránky nesmí být zamčené.
|
||||
* Pro přesun stránky potřebujete práva pro zápis v cílovém místě.
|
||||
* Nelze přesunout stránku někam, kde již existuje stránka stejného jména.
|
||||
|
||||
Všechny odkazy na a ze stránky budou upraveny podle nového umístění stránky.
|
48
lib/plugins/pagemove/lang/de/lang.php
Normal file
48
lib/plugins/pagemove/lang/de/lang.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* german language file
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author picsar <>
|
||||
*/
|
||||
|
||||
// settings must be present and set appropriately for the language
|
||||
$lang['encoding'] = 'utf-8';
|
||||
$lang['direction'] = 'ltr';
|
||||
|
||||
// for admin plugins, the menu prompt to be displayed in the admin menu
|
||||
// if set here, the plugin doesn't need to override the getMenuText() method
|
||||
$lang['menu'] = 'Seite/Namespace verschieben/umbenennen...';
|
||||
$lang['desc'] = 'Seite/Namespace verschieben/umbenennen... Plugin';
|
||||
|
||||
$lang['pm_notexist'] = 'Dieses Thema existiert noch nicht';
|
||||
$lang['pm_notstart'] = 'Die Startseite kann nicht verschoben oder umbenannt werden';
|
||||
$lang['pm_notwrite'] = 'Sie haben unzureichende Rechte um diese Seite zu ändern';
|
||||
$lang['pm_badns'] = 'Ungültige Zeichen in der Namensraum-Bezeichnung.';
|
||||
$lang['pm_badname'] = 'Ungültiges Zeichen im Seitennamen.';
|
||||
$lang['pm_nochange'] = 'Name und Namensraum der Seite sind unverändert.';
|
||||
$lang['pm_existing'] = 'Eine Seite mit der Bezeichnung %s existiert bereits in %s';
|
||||
$lang['pm_root'] = '[Wurzel des Namensraumes / Root namespace]';
|
||||
$lang['pm_current'] = '(Aktueller)';
|
||||
$lang['pm_movedfrom'] = 'Seite verschoben von ';
|
||||
$lang['pm_movedto'] = 'Seite verschoben nach ';
|
||||
$lang['pm_renamed'] = 'Seitename wurde geändert von %s auf %s';
|
||||
$lang['pm_moved'] = 'Seite verschoben von %s nach %s';
|
||||
$lang['pm_move_rename'] = 'Seite verschoben und umbenannt von %s nach %s';
|
||||
$lang['pm_norights'] = 'Sie haben unzureichende Rechte, einen oder mehrere Rückverweise mit diesem Dokument zu verändern.';
|
||||
$lang['pm_tryagain'] = 'Versuchen Sie es später nochmal.';
|
||||
$lang['pm_filelocked'] = 'Diese Datei ist gesperrt - ';
|
||||
$lang['pm_fileslocked'] = 'Diese Dateien sind gesperrt - ';
|
||||
$lang['pm_linkchange'] = 'Link mit %s geändert zu %s';
|
||||
$lang['pm_newname'] = 'Neuer Seitenname:';
|
||||
$lang['pm_newnsname'] = 'Neuen Namen für Namensraum verwenden:';
|
||||
$lang['pm_targetns'] = 'Wählen Sie einen neuen Namensraum: ';
|
||||
$lang['pm_newtargetns'] = 'Erstellen Sie einen neuen Namensraum';
|
||||
$lang['pm_movepage'] = 'Seite verschieben';
|
||||
$lang['pm_movens'] = 'Namensraum verschieben';
|
||||
$lang['pm_previewpage'] = ' wird verschoben nach ';
|
||||
$lang['pm_previewns'] = 'Alle Seiten und Namensräume im Namensraum %s: werden verschoben in den Namensraum';
|
||||
$lang['pm_preview'] = 'Vorschau';
|
||||
$lang['pm_delete'] = 'Gelöscht durch pagemove Plugin';
|
||||
$lang['pm_submit'] = 'Übernehmen';
|
||||
?>
|
14
lib/plugins/pagemove/lang/de/pagemove.txt
Normal file
14
lib/plugins/pagemove/lang/de/pagemove.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
====== Seite/Namespace verschieben/umbenennen ======
|
||||
|
||||
Mit diesem Plugin kann die aktuelle Seite verschoben/umbenannt oder ein gesamter Namensraum verschoben/umbenannt werden.
|
||||
|
||||
Folgende Einschränkungen/Bedingungen gelten:
|
||||
|
||||
* Die Startseite kann nicht verschoben werden.
|
||||
* Man benötigt die Bearbeiten-Rechte für die Seite und für alle Seiten die darauf verlinkt sind (Rückverweise).
|
||||
* Die Seite und deren Rückverweise dürfen nicht gesperrt sein, d.h. sich im Bearbeitungsmodus befinden.
|
||||
* Um eine Seite zu verschieben, benötigt man das Erstellen-Recht im Ziel-Namensraum.
|
||||
* Eine Seite kann nicht in einen Namensraum verschoben werden, in der bereits eine Seite gleichen Namens existiert.
|
||||
|
||||
Alle Links von und auf die Seite werden aktualisiert, um dem neuen Namen bzw. dem neuen Namensraum zu entsprechen.
|
||||
|
48
lib/plugins/pagemove/lang/en/lang.php
Normal file
48
lib/plugins/pagemove/lang/en/lang.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* english language file
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author Gary Owen <>
|
||||
*/
|
||||
|
||||
// settings must be present and set appropriately for the language
|
||||
$lang['encoding'] = 'utf-8';
|
||||
$lang['direction'] = 'ltr';
|
||||
|
||||
// for admin plugins, the menu prompt to be displayed in the admin menu
|
||||
// if set here, the plugin doesn't need to override the getMenuText() method
|
||||
$lang['menu'] = 'Page/Namespace Move/Rename...';
|
||||
$lang['desc'] = 'Page/Namespace Move/Rename Plugin';
|
||||
|
||||
$lang['pm_notexist'] = 'This topic does not exist yet';
|
||||
$lang['pm_notstart'] = 'The Start page cannot be moved or renamed';
|
||||
$lang['pm_notwrite'] = 'You do not have sufficient rights to modify this page';
|
||||
$lang['pm_badns'] = 'Invalid characters in namespace.';
|
||||
$lang['pm_badname'] = 'Invalid characters in pagename.';
|
||||
$lang['pm_nochange'] = 'Document name and namespace are unchanged.';
|
||||
$lang['pm_existing'] = 'A document called %s already exists in %s';
|
||||
$lang['pm_root'] = '[Root namespace]';
|
||||
$lang['pm_current'] = '(Current)';
|
||||
$lang['pm_movedfrom'] = 'Document moved from ';
|
||||
$lang['pm_movedto'] = 'Document moved to ';
|
||||
$lang['pm_renamed'] = 'Page name changed from %s to %s';
|
||||
$lang['pm_moved'] = 'Page moved from %s to %s';
|
||||
$lang['pm_move_rename'] = 'Page moved and renamed from %s to %s';
|
||||
$lang['pm_norights'] = 'You have insufficient permissions to edit one or more backlinks for this document.';
|
||||
$lang['pm_tryagain'] = 'Try again latter.';
|
||||
$lang['pm_filelocked'] = 'This file is locked - ';
|
||||
$lang['pm_fileslocked'] = 'These files are locked - ';
|
||||
$lang['pm_linkchange'] = 'Links to %s changed to %s';
|
||||
$lang['pm_newname'] = 'New document name :';
|
||||
$lang['pm_newnsname'] = 'Use new Name for Namespace:';
|
||||
$lang['pm_targetns'] = 'Select new Namespace :';
|
||||
$lang['pm_newtargetns'] = 'Create a new Namespace';
|
||||
$lang['pm_movepage'] = 'Move page';
|
||||
$lang['pm_movens'] = 'Move Namespace';
|
||||
$lang['pm_previewpage'] = ' get moved to ';
|
||||
$lang['pm_previewns'] = 'All pages and namespaces in the namespace %s: get moved in the namespace';
|
||||
$lang['pm_delete'] = 'Deleted by PageMove plugin';
|
||||
$lang['pm_preview'] = 'Preview';
|
||||
$lang['pm_submit'] = 'Submit';
|
||||
?>
|
13
lib/plugins/pagemove/lang/en/pagemove.txt
Normal file
13
lib/plugins/pagemove/lang/en/pagemove.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
====== Pagemove ======
|
||||
|
||||
This plugin allows you to move and/or rename the current document or move and/or rename the current namespace within the following restrictions.
|
||||
|
||||
* You cannot move the start page.
|
||||
* You must have edit permission for the document and any documents that point to it (backlinks).
|
||||
* The document and its' backlinks cannot be locked for editing.
|
||||
* For moving a file you also need create permission in the target directory.
|
||||
* You cannot move the document to a namespace where a document with the same name already exists.
|
||||
|
||||
All links to and from the page will be updated to reflect the new location and/or name.
|
||||
\\
|
||||
\\
|
42
lib/plugins/pagemove/lang/es/lang.php.txt
Normal file
42
lib/plugins/pagemove/lang/es/lang.php.txt
Normal file
@@ -0,0 +1,42 @@
|
||||
<code>
|
||||
<?php
|
||||
/**
|
||||
* spanish language file
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author Gary Owen <>
|
||||
* @translation Ruben Squartini <>
|
||||
*/
|
||||
|
||||
// settings must be present and set appropriately for the language
|
||||
$lang['encoding'] = 'utf-8';
|
||||
$lang['direction'] = 'ltr';
|
||||
|
||||
// for admin plugins, the menu prompt to be displayed in the admin menu
|
||||
// if set here, the plugin doesn't need to override the getMenuText() method
|
||||
$lang['menu'] = 'Mover/Renombrar página...';
|
||||
$lang['desc'] = 'Extensión para Mover/Renombrar páginas';
|
||||
|
||||
$lang['pm_notexist'] = 'Este tema no existe aún';
|
||||
$lang['pm_notstart'] = 'La página de Inicio no puede ser movida o renombrada';
|
||||
$lang['pm_notwrite'] = 'No tiene suficientes derechos para modificar esta página';
|
||||
$lang['pm_badns'] = 'Caractéres inválidos en el Espacio de Nombres.';
|
||||
$lang['pm_badname'] = 'Caractéres inválidos en el nombre de la página.';
|
||||
$lang['pm_nochange'] = 'Los cambios en el nombre de la página y del espacio no fueron cambiados.';
|
||||
$lang['pm_existing1'] = 'Un documento llamado ';
|
||||
$lang['pm_existing2'] = ' ya existe en ';
|
||||
$lang['pm_root'] = '[Espacio de Nombres Raiz]';
|
||||
$lang['pm_current'] = '(Actual)';
|
||||
$lang['pm_movedfrom'] = 'El documento fue movido de ';
|
||||
$lang['pm_movedto'] = 'El documento fue movido a ';
|
||||
$lang['pm_norights'] = 'No tiene suficientes permisos para editar uno o mas de los punteros a este documento.';
|
||||
$lang['pm_tryagain'] = 'Trate de nuevo en unos minutos.';
|
||||
$lang['pm_filelocked'] = 'Este documento está bloqueado - ';
|
||||
$lang['pm_fileslocked'] = 'Estos documentos están bloqueados - ';
|
||||
$lang['pm_linkchange1'] = 'Enlaces a ';
|
||||
$lang['pm_linkchange2'] = ' cambiados a ';
|
||||
$lang['pm_newname'] = 'Nombre del nuevo documento :';
|
||||
$lang['pm_targetns'] = 'Seleccione el Espacio de Nombres de Destino :';
|
||||
$lang['pm_submit'] = 'Enviar';
|
||||
?>
|
||||
</code>
|
13
lib/plugins/pagemove/lang/es/pagemove.txt.txt
Normal file
13
lib/plugins/pagemove/lang/es/pagemove.txt.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
====== Pagemove ======
|
||||
|
||||
Esta extensión le permite mover y/o renombrar el documento actual respetando las siguientes restricciones.
|
||||
|
||||
* No puede mover la página de Inicio.
|
||||
* Debe tener permisos de edición sobre el documento actual y sobre todos los documentos que enlazan con éste.
|
||||
* El documento actual y los que hacen referencia a éste no pueden ser bloqueados para la edición.
|
||||
* Para mover un documento también necesita permiso de creación sobre el directorio de destino.
|
||||
* No puede mover el documento a un Espacio de Nombres donde ya existe un documento con el mismo nombre.
|
||||
|
||||
Todos los enlaces desde y hacia esta página serán actualizados para reflejar la nueva ubicación y/o nombre.
|
||||
\\
|
||||
\\
|
40
lib/plugins/pagemove/lang/fr/lang.php
Normal file
40
lib/plugins/pagemove/lang/fr/lang.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* French language file
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
* @translator Clement Hermann (nodens) <clement.hermann@free.fr>
|
||||
*/
|
||||
|
||||
// settings must be present and set appropriately for the language
|
||||
$lang['encoding'] = 'utf-8';
|
||||
$lang['direction'] = 'ltr';
|
||||
|
||||
// for admin plugins, the menu prompt to be displayed in the admin menu
|
||||
// if set here, the plugin doesn't need to override the getMenuText() method
|
||||
$lang['menu'] = 'Déplacer/Renommer la page...';
|
||||
$lang['desc'] = 'Plugin de Déplacement/Renommage';
|
||||
|
||||
$lang['pm_notexist'] = 'Ce sujet n\'existe pas encore';
|
||||
$lang['pm_notstart'] = 'La page de démarrage (Start) ne peut être déplacée ou renommée';
|
||||
$lang['pm_notwrite'] = 'Vous ne disposez pas des droits suffisants pour modifier cette page';
|
||||
$lang['pm_badns'] = "Caractères invalides dans l'espace de nommage.";
|
||||
$lang['pm_badname'] = 'Caractères invalides dans le nom de la page.';
|
||||
$lang['pm_nochange'] = "Le nom du document et l'espace de nomage sont inchangés.";
|
||||
$lang['pm_existing1'] = 'Un document appelé ';
|
||||
$lang['pm_existing2'] = ' existe déjà dans ';
|
||||
$lang['pm_root'] = '[Espace de nom racine]';
|
||||
$lang['pm_current'] = '(Courant)';
|
||||
$lang['pm_movedfrom'] = 'Document déplacé depuis ';
|
||||
$lang['pm_movedto'] = 'Document déplacé vers ';
|
||||
$lang['pm_norights'] = 'Vos permissions sont insufisante pour éditer un ou plusieurs liens pointant vers cette page.';
|
||||
$lang['pm_tryagain'] = 'Réessayez plus tard.';
|
||||
$lang['pm_filelocked'] = 'Ce fichier est verrouillé - ';
|
||||
$lang['pm_fileslocked'] = 'Ces fichiers sont verrouillés - ';
|
||||
$lang['pm_linkchange1'] = 'Les liens vers ';
|
||||
$lang['pm_linkchange2'] = ' ont été changés vers ';
|
||||
$lang['pm_newname'] = 'Nouveau nom du document :';
|
||||
$lang['pm_targetns'] = 'Sélectionnez le nouvel espace de nommage :';
|
||||
|
||||
?>
|
13
lib/plugins/pagemove/lang/fr/pagemove.txt
Normal file
13
lib/plugins/pagemove/lang/fr/pagemove.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
====== Pagemove ======
|
||||
|
||||
Ce plugin permet de déplacer et/ou renommer le document courant, avec les limitations suivantes :
|
||||
* Il est impossible de déplacer la page d'accueil (start)
|
||||
* Il faut avoir les droits d'édition sur le document et sur chaque document qui pointe dessus (backlinks)
|
||||
* Le document et les liens pointant dessus ne peuvent être verrouillés pour l'édition
|
||||
* Pour déplacer une page il faut également disposer du droit de création dans le répertoire de destination
|
||||
* Il est impossible de déplacer le document vers un espace de nommage où un document du même nom existe déjà.
|
||||
|
||||
Tous les liens depuis et vers la page seront mis à jour pour refléter le nouvel emplacement et/ou le nouveau nom.
|
||||
|
||||
\\
|
||||
\\
|
39
lib/plugins/pagemove/lang/lv/lang.php
Normal file
39
lib/plugins/pagemove/lang/lv/lang.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* latvian language file
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author Aivars Miška <>
|
||||
*/
|
||||
|
||||
// settings must be present and set appropriately for the language
|
||||
$lang['encoding'] = 'utf-8';
|
||||
$lang['direction'] = 'ltr';
|
||||
|
||||
// for admin plugins, the menu prompt to be displayed in the admin menu
|
||||
// if set here, the plugin doesn't need to override the getMenuText() method
|
||||
$lang['menu'] = 'Lapas pārdēvēšana/pārvietošana...';
|
||||
$lang['desc'] = 'Page Move/Rename Plugin';
|
||||
|
||||
$lang['pm_notexist'] = 'This topic does not exist yet';
|
||||
$lang['pm_notstart'] = 'Ievadlapu nevar nedz pārdēvēt, nedz pārvietot';
|
||||
$lang['pm_notwrite'] = 'Tev nav tiesību labot šo lapu';
|
||||
$lang['pm_badns'] = 'Neatļautas rakstzīmes nodaļas vārdā.';
|
||||
$lang['pm_badname'] = 'Neatļautas rakstzīmes lapas vārdā.';
|
||||
$lang['pm_nochange'] = 'Vārds un nodaļa nav mainīti.';
|
||||
$lang['pm_existing1'] = 'Dokuments ';
|
||||
$lang['pm_existing2'] = ' jau ir nodaļā ';
|
||||
$lang['pm_root'] = '[Saknes direktorija]';
|
||||
$lang['pm_current'] = '(Tekošais)';
|
||||
$lang['pm_movedfrom'] = 'Dokuments pārvietots no ';
|
||||
$lang['pm_movedto'] = 'Dokuments pārvietos uz ';
|
||||
$lang['pm_norights'] = 'Tev nav tiesību labot kādu lapu, kas norāda uz šo dokumentu.';
|
||||
$lang['pm_tryagain'] = 'Mēģini vēlāk vēlreiz.';
|
||||
$lang['pm_filelocked'] = 'Bloķēts fails ';
|
||||
$lang['pm_fileslocked'] = 'Bloķēti faili ';
|
||||
$lang['pm_linkchange1'] = 'Norādes uz ';
|
||||
$lang['pm_linkchange2'] = ' nomainītas ar ';
|
||||
$lang['pm_newname'] = 'Jaunais dokumenta vārds :';
|
||||
$lang['pm_targetns'] = 'Nodaļa, kurp pārvietot :';
|
||||
$lang['pm_submit'] = 'Darīt!';
|
||||
?>
|
14
lib/plugins/pagemove/lang/lv/pagemove.txt
Normal file
14
lib/plugins/pagemove/lang/lv/pagemove.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
====== Lapas pārvietošana ======
|
||||
|
||||
Šis modulis ļauj pārvietot un/vai pārdēvēt tekošo lapu. \\
|
||||
Ar nosacījumiem:
|
||||
|
||||
* Nevar pārvietot ievadlapu.
|
||||
* Tev vajag tiesības labot šo lapu un visas lapas, kas uz to norāda.
|
||||
* Šī lapa un lapas, kas uz to norāda, nav bloķētas labošanai.
|
||||
* Lai pārvietotu, tev vajag attiecīgās tiesības mērķa direktorijā.
|
||||
* Nevar pārvietot lapu uz nodaļu, kurā jau ir šāda nosaukuma lapa.
|
||||
|
||||
Visas saites uz šo lapu un no tās tiks automātiski nomainītas atbilstoši jaunajam lapas nosaukumam un/vai vietai.
|
||||
\\
|
||||
\\
|
39
lib/plugins/pagemove/lang/nl/lang.php
Normal file
39
lib/plugins/pagemove/lang/nl/lang.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Nederlands (Dutch) language file
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
*/
|
||||
|
||||
// settings must be present and set appropriately for the language
|
||||
$lang['encoding'] = 'utf-8';
|
||||
$lang['direction'] = 'ltr';
|
||||
|
||||
// for admin plugins, the menu prompt to be displayed in the admin menu
|
||||
// if set here, the plugin doesn't need to override the getMenuText() method
|
||||
$lang['menu'] = 'Pagina Verplaatsen/Hernoemen...';
|
||||
$lang['desc'] = 'Pagina Verplaatsen/Hernoemen Plugin';
|
||||
|
||||
$lang['pm_notexist'] = 'Dit onderwerp bestaat nog niet';
|
||||
$lang['pm_notstart'] = 'De startpagina kan niet worden verplaatst of hernoemd';
|
||||
$lang['pm_notwrite'] = 'U heeft niet voldoende rechten om deze pagina te wijzigen';
|
||||
$lang['pm_badns'] = 'De namespace bevat een niet-toegestaan teken.';
|
||||
$lang['pm_badname'] = 'De paginanaam bevat een niet-toegestaan teken.';
|
||||
$lang['pm_nochange'] = 'De paginanaam en -namespace zijn ongewijzigd.';
|
||||
$lang['pm_existing1'] = 'Het document met naam ';
|
||||
$lang['pm_existing2'] = ' bestaat al in ';
|
||||
$lang['pm_root'] = '[Hoofdnamespace]';
|
||||
$lang['pm_current'] = '(Huidig)';
|
||||
$lang['pm_movedfrom'] = 'Document verplaatst van ';
|
||||
$lang['pm_movedto'] = 'Document verplaatst naar ';
|
||||
$lang['pm_norights'] = 'U heeft niet voldoende rechten om een of meerdere referenties aan te passen.';
|
||||
$lang['pm_tryagain'] = 'Probeer later opnieuw.';
|
||||
$lang['pm_filelocked'] = 'Deze file is geblokkeerd - ';
|
||||
$lang['pm_fileslocked'] = 'Deze files zijn geblokeerd - ';
|
||||
$lang['pm_linkchange1'] = 'Gelinkt aan ';
|
||||
$lang['pm_linkchange2'] = ' gewijzigd naar ';
|
||||
$lang['pm_newname'] = 'Nieuwe naam document:';
|
||||
$lang['pm_targetns'] = 'Selecteer namespace van het doel:';
|
||||
|
||||
?>
|
9
lib/plugins/pagemove/lang/nl/pagemove.txt
Normal file
9
lib/plugins/pagemove/lang/nl/pagemove.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
====== Pagina's verplaatsen ======
|
||||
|
||||
Deze plugin stelt je in staat pagina's te verplaatsen en/of te hernoemen binnen volgende beperkingen:
|
||||
* Het is onmogelijk om de startpagina te verplaatsen
|
||||
* Je moest toestemming hebben om wijzigingen aan te brengen aan al de documenten die verwijzen naar de te verplaatsen pagina (backlinks)
|
||||
* De pagina en zijn referenties kunnen niet geblokkeerd worden tijdens het verplaatsen
|
||||
* Om pagina's te verplaatsen heb je ook schrijfrechten nodig in de folder van bestemming
|
||||
* Je kan een pagina niet plaatsen in een namespace waar al een pagina bestaat met dezelfde naam
|
||||
Al de links van en naar de pagina zullen geupdated worden naar de nieuwe naam/locatie.
|
43
lib/plugins/pagemove/lang/pl/lang.php.txt
Normal file
43
lib/plugins/pagemove/lang/pl/lang.php.txt
Normal file
@@ -0,0 +1,43 @@
|
||||
<code php>
|
||||
<?php
|
||||
/**
|
||||
* english language file
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author Gary Owen <gary@isection.co.uk>
|
||||
* @translator Wojciech Kazimierczak <w.kazimierczak@gmail.com>
|
||||
|
||||
*/
|
||||
|
||||
// settings must be present and set appropriately for the language
|
||||
$lang['encoding'] = 'utf-8';
|
||||
$lang['direction'] = 'ltr';
|
||||
|
||||
// for admin plugins, the menu prompt to be displayed in the admin menu
|
||||
// if set here, the plugin doesn't need to override the getMenuText() method
|
||||
$lang['menu'] = 'Przenieś / Zmień nazwę strony';
|
||||
$lang['desc'] = 'Wtyczka Przenieś/Zmień nazwę';
|
||||
|
||||
$lang['pm_notexist'] = 'Ten temat jeszcze nie istnieje';
|
||||
$lang['pm_notstart'] = 'Strona start nie może być przeniesiona ani przemianowana';
|
||||
$lang['pm_notwrite'] = 'Niewystarczające uprawnienia by wykonać operację';
|
||||
$lang['pm_badns'] = 'Nieprawidłowy znak w nazwie katalogu';
|
||||
$lang['pm_badname'] = 'Nieprawidłowy znak w nazwie dokumentu';
|
||||
$lang['pm_nochange'] = 'Nazwa dokumentu i katalogu niezmieniona';
|
||||
$lang['pm_existing1'] = 'Dokument o nazwie ';
|
||||
$lang['pm_existing2'] = ' już istnieje ';
|
||||
$lang['pm_root'] = '[katalog bazowy]';
|
||||
$lang['pm_current'] = '(Bieżący)';
|
||||
$lang['pm_movedfrom'] = 'Dokument przeniesiony z ';
|
||||
$lang['pm_movedto'] = 'Dokument przeniesiony do ';
|
||||
$lang['pm_norights'] = 'Nie masz wystarczających uprawnień do zmiany co najmniej jednego z linków do tej strony';
|
||||
$lang['pm_tryagain'] = 'Spróbuj ponownie później';
|
||||
$lang['pm_filelocked'] = 'Ten plik jest zablokowany - ';
|
||||
$lang['pm_fileslocked'] = 'Te pliki są zablokowane - ';
|
||||
$lang['pm_linkchange1'] = 'Linki do ';
|
||||
$lang['pm_linkchange2'] = ' zmienione na ';
|
||||
$lang['pm_newname'] = 'Nowa nazwa dokumentu:';
|
||||
$lang['pm_targetns'] = 'Nazwa docelowego katalogu:';
|
||||
$lang['pm_submit'] = 'Zmień';
|
||||
?>
|
||||
</code>
|
13
lib/plugins/pagemove/lang/pl/pagemove.txt.txt
Normal file
13
lib/plugins/pagemove/lang/pl/pagemove.txt.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
====== Pagemove ======
|
||||
|
||||
Ta wtyczka umożliwia przeniesienie lub zmianę nazwy dokumentu z poniższymi zastrzeżeniami:
|
||||
|
||||
* Nie można przenieść strony start.
|
||||
* Musisz mieć uprawnienia do tego dokumentu i tych które na niego wskazują (linki wsteczne).
|
||||
* Dokument i jego wsteczne linki nie mogą być w trakcie edycji (założona blokada).
|
||||
* Do utworzenia pliku niezbędne jest uprawnienie w docelowym katalogu.
|
||||
* Nie można przesunąć dokumentu do katalogu, w którym już jest dokument o tej samej nazwie.
|
||||
|
||||
We wszystkich linkach z i do zmienianej strony będzie użyta nowa lokalizacja.
|
||||
\\
|
||||
\\
|
39
lib/plugins/pagemove/lang/ru/lang.php
Normal file
39
lib/plugins/pagemove/lang/ru/lang.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Russian language file
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author S'Adm*n <s-adm_n@mail.ru>
|
||||
*/
|
||||
|
||||
// settings must be present and set appropriately for the language
|
||||
$lang['encoding'] = 'utf-8';
|
||||
$lang['direction'] = 'ltr';
|
||||
|
||||
// for admin plugins, the menu prompt to be displayed in the admin menu
|
||||
// if set here, the plugin doesn't need to override the getMenuText() method
|
||||
$lang['menu'] = 'Перемещение/переименование страницы...';
|
||||
$lang['desc'] = 'Page Move/Rename Plugin';
|
||||
|
||||
$lang['pm_notexist'] = 'Эта страница еще не существует';
|
||||
$lang['pm_notstart'] = 'Недоступно для стартовой страницы';
|
||||
$lang['pm_notwrite'] = 'Ваши права доступа не позволяют Вам изменять эту страницу';
|
||||
$lang['pm_badns'] = 'В названии пространства имён присутствуют недопустимые символы.';
|
||||
$lang['pm_badname'] = 'Недопустимые символы в названии страниц.';
|
||||
$lang['pm_nochange'] = 'Параметры страницы не изменены.';
|
||||
$lang['pm_existing1'] = 'Страница с именем ';
|
||||
$lang['pm_existing2'] = ' уже существует в ';
|
||||
$lang['pm_root'] = '[Корневой каталог]';
|
||||
$lang['pm_current'] = '(Текущий)';
|
||||
$lang['pm_movedfrom'] = 'Документ перемещён из ';
|
||||
$lang['pm_movedto'] = 'Документ перемещён в ';
|
||||
$lang['pm_norights'] = 'У Вас нет прав на редактирование одной из страниц, ссылающихся на данный документ.';
|
||||
$lang['pm_tryagain'] = 'Попробуйте позже.';
|
||||
$lang['pm_filelocked'] = 'Изменение данного файла запрещено - ';
|
||||
$lang['pm_fileslocked'] = 'Изменение данных файлов запрещено - ';
|
||||
$lang['pm_linkchange1'] = 'Ссылки на страницу ';
|
||||
$lang['pm_linkchange2'] = ' изменены на ';
|
||||
$lang['pm_newname'] = 'Новое название документа :';
|
||||
$lang['pm_targetns'] = 'Переместить в пространство :';
|
||||
$lang['pm_submit'] = 'Применить';
|
||||
?>
|
13
lib/plugins/pagemove/lang/ru/pagemove.txt
Normal file
13
lib/plugins/pagemove/lang/ru/pagemove.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
====== Перемещение страницы ======
|
||||
|
||||
Этот плагин позволяет перемещать и/или переименовывать текущую страницу со следующими ограничениями:
|
||||
|
||||
* Стартовая страница не может быть перемещена.
|
||||
* Вы должны обладать правом редактировать эту страницу и все другие, ссылающиеся на неё.
|
||||
* Текущая страница и ссылающиеся на неё не должны быть заблокированы для редактирования.
|
||||
* Вы должны обладать соответствующими правами доступа в директории, куда Вы планируете переместить файл.
|
||||
* Вы не можете переместить страницу в пространство имён, уже содержащее страницу с таким же названием.
|
||||
|
||||
Все ссылки, ведущие с этой страницы и на неё, будут обновлены в соответствии с внесёнными изменениями.
|
||||
\\
|
||||
\\
|
39
lib/plugins/pagemove/lang/sl/lang.php
Normal file
39
lib/plugins/pagemove/lang/sl/lang.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Slovene language file
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author Jernej Jakob <>
|
||||
*/
|
||||
|
||||
// settings must be present and set appropriately for the language
|
||||
$lang['encoding'] = 'utf-8';
|
||||
$lang['direction'] = 'ltr';
|
||||
|
||||
// for admin plugins, the menu prompt to be displayed in the admin menu
|
||||
// if set here, the plugin doesn't need to override the getMenuText() method
|
||||
$lang['menu'] = 'Premakni/preimenuj stran...';
|
||||
$lang['desc'] = 'Plugin za premikanje/preimenovanje strani';
|
||||
|
||||
$lang['pm_notexist'] = 'Ta stran še ne obstaja';
|
||||
$lang['pm_notstart'] = 'Začetne strani ne morete premakniti/preimenovati';
|
||||
$lang['pm_notwrite'] = 'Nimate zadostnih pravic za urejanje te strani';
|
||||
$lang['pm_badns'] = 'Neveljavni znaki v imenskem prostoru.';
|
||||
$lang['pm_badname'] = 'Neveljavni znaki v imenu strani.';
|
||||
$lang['pm_nochange'] = 'Ime dokumenta in imenski prostor sta nespremenjena.';
|
||||
$lang['pm_existing1'] = 'Dokument imenovan ';
|
||||
$lang['pm_existing2'] = ' že obstaja v ';
|
||||
$lang['pm_root'] = '[Korenski imenski prostor/Root namespace]';
|
||||
$lang['pm_current'] = '(Trenutno)';
|
||||
$lang['pm_movedfrom'] = 'Dokument premaknjen iz ';
|
||||
$lang['pm_movedto'] = 'Dokument premaknjen na ';
|
||||
$lang['pm_norights'] = 'Nimate zadostnih pravic za urejanje enega ali več backlinkov za ta dokument.';
|
||||
$lang['pm_tryagain'] = 'Poskusite ponovno kasneje.';
|
||||
$lang['pm_filelocked'] = 'Ta datoteka je zaklenjena - ';
|
||||
$lang['pm_fileslocked'] = 'Te datoteke so zaklenjene - ';
|
||||
$lang['pm_linkchange1'] = 'Kaže na ';
|
||||
$lang['pm_linkchange2'] = ' spremenjeno na ';
|
||||
$lang['pm_newname'] = 'Novo ime dokumenta :';
|
||||
$lang['pm_targetns'] = 'Izberite ciljni imenski prostor :';
|
||||
$lang['pm_submit'] = 'Potrdi';
|
||||
?>
|
13
lib/plugins/pagemove/lang/sl/pagemove.txt
Normal file
13
lib/plugins/pagemove/lang/sl/pagemove.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
====== Pagemove ======
|
||||
|
||||
Ta plugin omogoča premikanje in/ali preimenovanje trenutnega dokumenta v okviru naslednjih omejitev:
|
||||
|
||||
* Začetne strani ne morete premakniti.
|
||||
* Morate imeti pravico do urejanja dokumenta in vseh dokumentov, ki kažejo na ta dokument (backlinki).
|
||||
* Dokument in njegovi backlinki ne smejo biti zaklenjeni za urejanje.
|
||||
* Za premikanje datoteke potrebujete pravico za ustvarjanje v ciljni mapi.
|
||||
* Ne morete premakniti dokumenta v imenski prostor, kjer dokument z istim imenom že obstaja.
|
||||
|
||||
Vsi linki na in z strani bodo posodobljeni, da bodo kazali na novo lokacijo in/ali ime.
|
||||
\\
|
||||
\\
|
39
lib/plugins/pagemove/lang/zh/lang.php
Normal file
39
lib/plugins/pagemove/lang/zh/lang.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* 中文文件
|
||||
*
|
||||
* @许可协议 GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @作者 Gary Owen <>
|
||||
* @翻译 TombCrow <http://wiki.gmly.cn>
|
||||
*/
|
||||
|
||||
// 此处设置用户语言
|
||||
$lang['encoding'] = 'utf-8';
|
||||
$lang['direction'] = 'ltr';
|
||||
|
||||
// 若在此处设置,插件不必要求 getMenuText() 模式
|
||||
$lang['menu'] = '页面移动/重命名……';
|
||||
$lang['desc'] = '页面移动/重命名插件';
|
||||
|
||||
$lang['pm_notexist'] = '这个主题还不存在';
|
||||
$lang['pm_notstart'] = '不能移动或重命名起始页面';
|
||||
$lang['pm_notwrite'] = '您无权修改这个页面';
|
||||
$lang['pm_badns'] = '分类名中存在无效字符';
|
||||
$lang['pm_badname'] = '页面名中存在无效字符';
|
||||
$lang['pm_nochange'] = '不能更改文件名和分类名';
|
||||
$lang['pm_existing1'] = '文件 ';
|
||||
$lang['pm_existing2'] = ' 已经存在于 ';
|
||||
$lang['pm_root'] = '[跟目录]';
|
||||
$lang['pm_current'] = '(当前)';
|
||||
$lang['pm_movedfrom'] = '文件移动自 ';
|
||||
$lang['pm_movedto'] = '文件移动至 ';
|
||||
$lang['pm_norights'] = '您无权编辑此文件的 backlinks';
|
||||
$lang['pm_tryagain'] = '请稍后重试';
|
||||
$lang['pm_filelocked'] = '此文件被锁定 - ';
|
||||
$lang['pm_fileslocked'] = '这些文件被锁定 - ';
|
||||
$lang['pm_linkchange1'] = '链接到 ';
|
||||
$lang['pm_linkchange2'] = ' 更改到 ';
|
||||
$lang['pm_newname'] = '新的文件名 :';
|
||||
$lang['pm_targetns'] = '选择目标分类 :';
|
||||
$lang['pm_submit'] = '提交';
|
||||
?>
|
14
lib/plugins/pagemove/lang/zh/pagemove.txt
Normal file
14
lib/plugins/pagemove/lang/zh/pagemove.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="moz-text-flowed" style="font-family: -moz-fixed">====== Pagemove ======
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD>⣺
|
||||
|
||||
* <20><><EFBFBD><EFBFBD><DEB7>ƶ<EFBFBD><C6B6><EFBFBD>ʼҳ<CABC>档
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>༭<EFBFBD><E0BCAD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD>ҳ<EFBFBD><D2B3><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>backlinks<6B><73>Ȩ<EFBFBD>ޡ<EFBFBD>
|
||||
* <20>ļ<EFBFBD><C4BC><EFBFBD> backlinks <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹ<EFBFBD>༭<EFBFBD><E0BCAD><EFBFBD><EFBFBD>
|
||||
* Ҫ<>ƶ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>Ŀ<EFBFBD><C4BF>Ŀ¼<C4BF><C2BC><EFBFBD><EFBFBD>Ȩ<EFBFBD>ޡ<EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD>ļ<EFBFBD><C4BC>ƶ<EFBFBD><C6B6><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>Ѿ<EFBFBD>ӵ<EFBFBD><D3B5>ͬ<EFBFBD><CDAC><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>Ŀ¼<C4BF>¡<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>¡<EFBFBD>
|
||||
\\
|
||||
\\
|
||||
</div>
|
7
lib/plugins/pagemove/plugin.info.txt
Normal file
7
lib/plugins/pagemove/plugin.info.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
base pagemove
|
||||
author Gary Owen, Arno Puschmann, Christoph Jähnigen
|
||||
email pagemove@gmail.com
|
||||
date 2010-06-17
|
||||
name Pagemove plugin
|
||||
desc Move and rename pages and namespaces whilst maintaining the links.
|
||||
url http://www.dokuwiki.org/plugin:pagemove
|
Reference in New Issue
Block a user