diff --git a/README b/README index b24492a..44b8df2 100644 --- a/README +++ b/README @@ -1 +1 @@ -A DokuWiki pagemove plugin +A DokuWiki move plugin diff --git a/_test/mediaindex.test.php b/_test/mediaindex.test.php index b492f83..f5944ab 100644 --- a/_test/mediaindex.test.php +++ b/_test/mediaindex.test.php @@ -8,10 +8,10 @@ * * @author Michael Hamann */ -class plugin_pagemove_mediaindex_test extends DokuWikiTest { +class plugin_move_mediaindex_test extends DokuWikiTest { public function setUp() { - $this->pluginsEnabled[] = 'pagemove'; + $this->pluginsEnabled[] = 'move'; parent::setUp(); } diff --git a/_test/mediamove.test.php b/_test/mediamove.test.php index d7f099d..9b0c8ee 100644 --- a/_test/mediamove.test.php +++ b/_test/mediamove.test.php @@ -4,12 +4,12 @@ if (!defined('DOKU_INC')) die(); /** - * Test cases for the pagemove plugin + * Test cases for the move plugin */ -class plugin_pagemove_mediamove_test extends DokuWikiTest { +class plugin_move_mediamove_test extends DokuWikiTest { public function setUp() { - $this->pluginsEnabled[] = 'pagemove'; + $this->pluginsEnabled[] = 'move'; parent::setUp(); } @@ -28,9 +28,9 @@ public function test_movePageWithRelativeMedia() { $opts['name'] = noNS($ID); $opts['newns'] = ''; $opts['newname'] = 'foo'; - /** @var helper_plugin_pagemove $pagemove */ - $pagemove = plugin_load('helper', 'pagemove'); - $this->assertTrue($pagemove->move_page($opts)); + /** @var helper_plugin_move $move */ + $move = plugin_load('helper', 'move'); + $this->assertTrue($move->move_page($opts)); $this->assertEquals('{{ mediareltest:myimage.png}} [[:start|{{ mediareltest:testimage.png?200x800 }}]] [[mediareltest:bar|{{mediareltest:testimage.gif?400x200}}]] [[doku>wiki:dokuwiki|{{wiki:logo.png}}]] [[http://www.example.com|{{mediareltest:testimage.jpg}}]] @@ -52,9 +52,9 @@ public function test_moveSingleMedia() { $opts['newns'] = 'foobar'; $opts['newname'] = 'logo.png'; - /** @var helper_plugin_pagemove $pagemove */ - $pagemove = plugin_load('helper', 'pagemove'); - $this->assertTrue($pagemove->move_media($opts)); + /** @var helper_plugin_move $move */ + $move = plugin_load('helper', 'move'); + $this->assertTrue($move->move_media($opts)); $this->assertTrue(@file_exists(mediaFn('foobar:logo.png'))); diff --git a/_test/namespace_move.test.php b/_test/namespace_move.test.php index a9c10e4..2767d25 100644 --- a/_test/namespace_move.test.php +++ b/_test/namespace_move.test.php @@ -4,12 +4,12 @@ if (!defined('DOKU_INC')) die(); /** - * Test cases for namespace move functionality of the pagemove plugin + * Test cases for namespace move functionality of the move plugin */ -class plugin_pagemove_namespace_move_test extends DokuWikiTest { +class plugin_move_namespace_move_test extends DokuWikiTest { public function setUp() { - $this->pluginsEnabled[] = 'pagemove'; + $this->pluginsEnabled[] = 'move'; parent::setUp(); } @@ -21,17 +21,17 @@ public function test_move_wiki_namespace() { idx_addPage('wiki:dokuwiki'); idx_addPage('wiki:syntax'); - /** @var helper_plugin_pagemove $pagemove */ - $pagemove = plugin_load('helper', 'pagemove'); + /** @var helper_plugin_move $move */ + $move = plugin_load('helper', 'move'); $opts = array( 'ns' => 'wiki', 'newns' => 'foo', 'contenttomove' => 'both' ); - $this->assertSame(3, $pagemove->start_namespace_move($opts)); - $this->assertSame(1, $pagemove->continue_namespace_move()); - $this->assertSame(0, $pagemove->continue_namespace_move()); + $this->assertSame(3, $move->start_namespace_move($opts)); + $this->assertSame(1, $move->continue_namespace_move()); + $this->assertSame(0, $move->continue_namespace_move()); $this->assertFileExists(wikiFN('foo:dokuwiki')); $this->assertFileNotExists(wikiFN('wiki:syntax')); diff --git a/_test/pagemove.test.php b/_test/pagemove.test.php index db1d317..de7a80e 100644 --- a/_test/pagemove.test.php +++ b/_test/pagemove.test.php @@ -4,9 +4,9 @@ if (!defined('DOKU_INC')) die(); /** - * Test cases for the pagemove plugin + * Test cases for the move plugin */ -class PagemovePageTest extends DokuWikiTest { +class plugin_move_pagemove_test extends DokuWikiTest { var $movedToId = ''; var $movedId = 'parent_ns:current_ns:test_page'; @@ -14,14 +14,14 @@ class PagemovePageTest extends DokuWikiTest { 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'; - /** @var helper_plugin_pagemove $pagemove */ - private $pagemove = NULL; + /** @var helper_plugin_move $move */ + private $move = NULL; // @todo Move page to an ID which already exists // @todo Check backlinks of a sub-namespace page (moving same, up, down, different) function setUp() { - $this->pluginsEnabled[] = 'pagemove'; + $this->pluginsEnabled[] = 'move'; global $ID; global $INFO; @@ -166,7 +166,7 @@ function setUp() { $references = array_keys(p_get_metadata($this->subNsPage, 'relation references', METADATA_RENDER_UNLIMITED)); idx_get_indexer()->addMetaKeys($this->subNsPage, 'relation_references', $references); - $this->pagemove = new helper_plugin_pagemove(); + $this->move = new helper_plugin_move(); parent::setUp(); } @@ -175,7 +175,7 @@ function setUp() { # } // function test_pm_getforwardlinks() { -// $origLinkAbsLinkArray = $this->pagemove->_pm_getforwardlinks($this->movedId); +// $origLinkAbsLinkArray = $this->move->_pm_getforwardlinks($this->movedId); // } function test_move_page_in_same_ns() { @@ -190,7 +190,7 @@ function test_move_page_in_same_ns() { $opts['newns'] = $opts['ns']; $opts['newname'] = $newPagename; $this->movedToId = $opts['newns'].':'.$newPagename; - $this->pagemove->move_page($opts); + $this->move->move_page($opts); $newId = $opts['newns'].':'.$opts['newname']; $newContent = rawWiki($newId); @@ -308,7 +308,7 @@ function test_move_page_to_parallel_ns() { $opts['newns'] = 'parent_ns:parallel_ns'; $opts['newname'] = $newPagename; $this->movedToId = $opts['newns'].':'.$newPagename; - $this->pagemove->move_page($opts); + $this->move->move_page($opts); $newId = $opts['newns'].':'.$opts['newname']; $newContent = rawWiki($newId); @@ -428,7 +428,7 @@ function test_move_page_to_parent_ns() { $newId = $opts['newns'].':'.$opts['newname']; $this->movedToId = $opts['newns'].':'.$newPagename; - $this->pagemove->move_page($opts); + $this->move->move_page($opts); $newContent = rawWiki($newId); $expectedContent = <<movedToId = $opts['newns'].':'.$newPagename; - //$this->pagemove->_pm_move_recursive($opts); + //$this->move->_pm_move_recursive($opts); } diff --git a/action.php b/action.php index 967d161..f50166b 100644 --- a/action.php +++ b/action.php @@ -1,6 +1,6 @@ @@ -9,9 +9,9 @@ if (!defined('DOKU_INC')) die(); /** - * Action part of the pagemove plugin + * Action part of the move plugin */ -class action_plugin_pagemove extends DokuWiki_Action_Plugin { +class action_plugin_move extends DokuWiki_Action_Plugin { /** * Register event handlers. * @@ -61,7 +61,7 @@ function handle_read(Doku_Event $event, $param) { // the page is locked by the current user || checklock($id) !== false || @file_exists(wikiLockFN($id))) return; - $helper = $this->loadHelper('pagemove', true); + $helper = $this->loadHelper('move', true); if(!is_null($helper)) { $stack[$id] = true; $event->result = $helper->execute_rewrites($id, $event->result); @@ -89,7 +89,7 @@ function handle_cache(Doku_Event $event, $param) { } } if ($id) { - $meta = p_get_metadata($id, 'plugin_pagemove', METADATA_DONT_RENDER); + $meta = p_get_metadata($id, 'plugin_move', METADATA_DONT_RENDER); if ($meta && (isset($meta['moves']) || isset($meta['media_moves']))) { $file = wikiFN($id, '', false); if (is_writable($file)) @@ -101,7 +101,7 @@ function handle_cache(Doku_Event $event, $param) { } /** - * Add the pagemove version to theindex version + * Add the move version to theindex version * * @param Doku_Event $event The event object * @param array $param Optional parameters (unused) @@ -109,7 +109,7 @@ function handle_cache(Doku_Event $event, $param) { public function handle_index_version(Doku_Event $event, $param) { // From indexer version 6 on the media references are indexed by DokuWiki itself if ($event->data['dokuwiki'] < 6) - $event->data['plugin_pagemove'] = 0.2; + $event->data['plugin_move'] = 0.2; } /** @@ -164,18 +164,18 @@ private function get_media_references_from_instructions($instructions, &$media_r } /** - * Handle the plugin_pagemove_ns_continue ajax call + * Handle the plugin_move_ns_continue ajax call * * @param Doku_Event $event The event that is handled * @param array $params Optional parameters (unused) */ public function handle_ajax_call(Doku_Event $event, $params) { - if ($event->data == 'plugin_pagemove_ns_continue') { + if ($event->data == 'plugin_move_ns_continue') { $event->preventDefault(); $event->stopPropagation(); - /** @var helper_plugin_pagemove $helper */ - $helper = $this->loadHelper('pagemove', false); + /** @var helper_plugin_move $helper */ + $helper = $this->loadHelper('move', false); $opts = $helper->get_namespace_move_opts(); $id = cleanID((string)$_POST['id']); $skip = (string)$_POST['skip']; diff --git a/admin.php b/admin.php index 582570d..5af8747 100644 --- a/admin.php +++ b/admin.php @@ -1,6 +1,6 @@ @@ -11,13 +11,13 @@ if (!defined('DOKU_INC')) die(); /** - * Admin component of the pagemove plugin. Provides the user interface. + * Admin component of the move plugin. Provides the user interface. */ -class admin_plugin_pagemove extends DokuWiki_Admin_Plugin { +class admin_plugin_move extends DokuWiki_Admin_Plugin { var $opts = array(); private $ns_opts = false; - /** @var helper_plugin_pagemove $helper */ + /** @var helper_plugin_move $helper */ private $helper = null; /** @var string $ns_move_state The state of the current namespace move (none, started, continued, error) */ private $ns_move_state = 'none'; @@ -68,9 +68,9 @@ function getMenuText() { */ function html() { if (!$this->helper) return; - ptln(''); - ptln( $this->locale_xhtml('pagemove') ); - ptln('
'); + ptln(''); + ptln( $this->locale_xhtml('move') ); + ptln('
'); switch ($this->ns_move_state) { case 'started': @@ -100,7 +100,7 @@ function html() { $this->printForm(); } ptln('
'); - ptln(''); + ptln(''); } /** @@ -116,7 +116,7 @@ function printForm() { $ns_select_data = $this->build_namespace_select_content($ns); - $form = new Doku_Form(array('action' => wl($ID), 'method' => 'post', 'class' => 'pagemove__form')); + $form = new Doku_Form(array('action' => wl($ID), 'method' => 'post', 'class' => 'move__form')); $form->addHidden('page', $this->getPluginName()); $form->addHidden('id', $ID); $form->addHidden('move_type', 'page'); @@ -140,7 +140,7 @@ function printForm() { ptln($this->helper->getNSMoveButton('abort')); ptln(''); } else { - $form = new Doku_Form(array('action' => wl($ID), 'method' => 'post', 'class' => 'pagemove__form')); + $form = new Doku_Form(array('action' => wl($ID), 'method' => 'post', 'class' => 'move__form')); $form->addHidden('page', $this->getPluginName()); $form->addHidden('id', $ID); $form->addHidden('move_type', 'namespace'); @@ -203,7 +203,7 @@ function handle() { $this->opts['move_type'] = 'page'; $this->opts['contenttomove'] = 'pages'; - $this->helper = $this->loadHelper('pagemove', true); + $this->helper = $this->loadHelper('move', true); if (!$this->helper) return; $this->ns_opts = $this->helper->get_namespace_move_opts(); diff --git a/helper.php b/helper.php index 13d96ee..ccb7359 100644 --- a/helper.php +++ b/helper.php @@ -1,6 +1,6 @@ @@ -9,9 +9,9 @@ if (!defined('DOKU_INC')) die(); /** - * Helper part of the pagemove plugin. + * Helper part of the move plugin. */ -class helper_plugin_pagemove extends DokuWiki_Plugin { +class helper_plugin_move extends DokuWiki_Plugin { /** * Move a namespace according to the given options * @@ -285,16 +285,16 @@ public function get_namespace_move_opts() { } /** - * Get the filenames for the metadata of the pagemove plugin + * Get the filenames for the metadata of the move plugin * * @return array The file names for opts, pagelist and medialist */ protected function get_namespace_meta_files() { global $conf; return array( - 'opts' => $conf['metadir'].'/__pagemove_opts', - 'pagelist' => $conf['metadir'].'/__pagemove_pagelist', - 'medialist' => $conf['metadir'].'/__pagemove_medialist' + 'opts' => $conf['metadir'].'/__move_opts', + 'pagelist' => $conf['metadir'].'/__move_pagelist', + 'medialist' => $conf['metadir'].'/__move_medialist' ); } @@ -379,7 +379,7 @@ public function move_page(&$opts, $checkonly = false) { * End of init (checks) */ - $page_meta = p_get_metadata($ID, 'plugin_pagemove', METADATA_DONT_RENDER); + $page_meta = p_get_metadata($ID, 'plugin_move', METADATA_DONT_RENDER); if (!$page_meta) $page_meta = array(); if (!isset($page_meta['old_ids'])) $page_meta['old_ids'] = array(); $page_meta['old_ids'][$ID] = time(); @@ -392,7 +392,7 @@ public function move_page(&$opts, $checkonly = false) { // to the oldfiles/newfiles array or to adjust their own metadata, database, ... // and to add other pages to the affected pages // note that old_ids is in the form 'id' => timestamp of move - $event = new Doku_Event('PAGEMOVE_PAGE_RENAME', $data); + $event = new Doku_Event('MOVE_PAGE_RENAME', $data); if ($event->advise_before()) { // Open the old document and change forward links lock($ID); @@ -405,7 +405,7 @@ public function move_page(&$opts, $checkonly = false) { if (method_exists('Doku_Indexer', 'renamePage')) { // new feature since Spring 2013 release $Indexer = idx_get_indexer(); } else { - $Indexer = new helper_plugin_pagemove_indexer(); // copy of the new code + $Indexer = new helper_plugin_move_indexer(); // copy of the new code } if (($idx_msg = $Indexer->renamePage($ID, $opts['new_id'])) !== true || ($idx_msg = $Indexer->renameMetaValue('relation_references', $ID, $opts['new_id'])) !== true) { @@ -448,16 +448,16 @@ public function move_page(&$opts, $checkonly = false) { foreach ($affected_pages as $id) { if (!page_exists($id, '', false) || $id == $ID || $id == $opts['new_id']) continue; // we are only interested in persistent metadata, so no need to render anything. - $meta = p_get_metadata($id, 'plugin_pagemove', METADATA_DONT_RENDER); + $meta = p_get_metadata($id, 'plugin_move', METADATA_DONT_RENDER); if (!$meta) $meta = array('moves' => array()); if (!isset($meta['moves'])) $meta['moves'] = array(); $meta['moves'] = $this->resolve_moves($meta['moves'], $id); $meta['moves'][$ID] = $opts['new_id']; //if (empty($meta['moves'])) unset($meta['moves']); - p_set_metadata($id, array('plugin_pagemove' => $meta), false, true); + p_set_metadata($id, array('plugin_move' => $meta), false, true); } - p_set_metadata($opts['new_id'], array('plugin_pagemove' => $page_meta), false, true); + p_set_metadata($opts['new_id'], array('plugin_move' => $page_meta), false, true); unlock($ID); } @@ -523,13 +523,13 @@ public function move_media(&$opts, $checkonly = false) { // give plugins the option to add their own meta files to the list of files that need to be moved // to the oldfiles/newfiles array or to adjust their own metadata, database, ... // and to add other pages to the affected pages - $event = new Doku_Event('PAGEMOVE_MEDIA_RENAME', $data); + $event = new Doku_Event('MOVE_MEDIA_RENAME', $data); if ($event->advise_before()) { // Move the Subscriptions & Indexes if (method_exists('Doku_Indexer', 'renamePage')) { // new feature since Spring 2013 release $Indexer = idx_get_indexer(); } else { - $Indexer = new helper_plugin_pagemove_indexer(); // copy of the new code + $Indexer = new helper_plugin_move_indexer(); // copy of the new code } if (($idx_msg = $Indexer->renameMetaValue('relation_media', $opts['id'], $opts['new_id'])) !== true) { msg('Error while updating the search index '.$idx_msg, -1); @@ -559,13 +559,13 @@ public function move_media(&$opts, $checkonly = false) { foreach ($affected_pages as $id) { if (!page_exists($id, '', false)) continue; // we are only interested in persistent metadata, so no need to render anything. - $meta = p_get_metadata($id, 'plugin_pagemove', METADATA_DONT_RENDER); + $meta = p_get_metadata($id, 'plugin_move', METADATA_DONT_RENDER); if (!$meta) $meta = array('media_moves' => array()); if (!isset($meta['media_moves'])) $meta['media_moves'] = array(); $meta['media_moves'] = $this->resolve_moves($meta['media_moves'], '__'); $meta['media_moves'][$opts['id']] = $opts['new_id']; //if (empty($meta['moves'])) unset($meta['moves']); - p_set_metadata($id, array('plugin_pagemove' => $meta), false, true); + p_set_metadata($id, array('plugin_move' => $meta), false, true); } } @@ -576,7 +576,7 @@ public function move_media(&$opts, $checkonly = false) { /** * Move the old revisions of the media file that is specified in the options * - * @param array $opts Pagemove options (used here: name, newname, ns, newns) + * @param array $opts Move options (used here: name, newname, ns, newns) * @return bool If the attic files were moved successfully */ public function movemediaattic($opts) { @@ -607,7 +607,7 @@ public function movemediaattic($opts) { /** * Move the meta files of the page that is specified in the options. * - * @param array $opts Pagemove options (used here: name, newname, ns, newns) + * @param array $opts Move options (used here: name, newname, ns, newns) * @return bool If the meta files were moved successfully */ public function movemediameta($opts) { @@ -620,7 +620,7 @@ public function movemediameta($opts) { /** * Move the old revisions of the page that is specified in the options. * - * @param array $opts Pagemove options (used here: name, newname, ns, newns) + * @param array $opts Move options (used here: name, newname, ns, newns) * @return bool If the attic files were moved successfully */ public function moveattic($opts) { @@ -633,7 +633,7 @@ public function moveattic($opts) { /** * Move the meta files of the page that is specified in the options. * - * @param array $opts Pagemove options (used here: name, newname, ns, newns) + * @param array $opts Move options (used here: name, newname, ns, newns) * @return bool If the meta files were moved successfully */ public function movemeta($opts) { @@ -647,7 +647,7 @@ public function movemeta($opts) { * Internal function for moving and renaming meta/attic files between namespaces * * @param string $dir The root path of the files (e.g. $conf['metadir'] or $conf['olddir'] - * @param array $opts Pagemove options (used here: ns, newns, name, newname) + * @param array $opts Move options (used here: ns, newns, name, newname) * @param string $extregex Regular expression for matching the extension of the file that shall be moved * @return bool If the files were moved successfully */ @@ -694,7 +694,7 @@ private function move_files($dir, $opts, $extregex) { * @return string The rewritten content */ public function execute_rewrites($id, $text = null) { - $meta = p_get_metadata($id, 'plugin_pagemove', METADATA_DONT_RENDER); + $meta = p_get_metadata($id, 'plugin_move', METADATA_DONT_RENDER); if($meta && (isset($meta['moves']) || isset($meta['media_moves']))) { if(is_null($text)) $text = rawWiki($id); $moves = isset($meta['moves']) ? $meta['moves'] : array(); @@ -713,7 +713,7 @@ public function execute_rewrites($id, $text = null) { } unset($meta['moves']); unset($meta['media_moves']); - p_set_metadata($id, array('plugin_pagemove' => $meta), false, true); + p_set_metadata($id, array('plugin_move' => $meta), false, true); } else { // FIXME: print error here or fail silently? msg('Error: Page '.hsc($id).' needs to be rewritten because of page renames but is not writable.', -1); } @@ -739,7 +739,7 @@ function rewrite_content($text, $id, $moves, $media_moves = array()) { $data = array('id' => $id, 'moves' => &$moves, 'handlers' => &$handlers); /* - * PAGEMOVE_HANDLERS REGISTER event: + * MOVE_HANDLERS REGISTER event: * * Plugin handlers can be registered in the $handlers array, the key is the plugin name as it is given to the handler * The handler needs to be a valid callback, it will get the following parameters: @@ -752,7 +752,7 @@ function rewrite_content($text, $id, $moves, $media_moves = array()) { * - moves: array of moves, the same as $moves in the event * - adaptRelativeId($id): adapts the relative $id according to the moves */ - trigger_event('PAGEMOVE_HANDLERS_REGISTER', $data); + trigger_event('MOVE_HANDLERS_REGISTER', $data); $modes = p_get_parsermodes(); @@ -760,7 +760,7 @@ function rewrite_content($text, $id, $moves, $media_moves = array()) { $Parser = new Doku_Parser(); // Add the Handler - $Parser->Handler = new helper_plugin_pagemove_handler($id, $moves, $media_moves, $handlers); + $Parser->Handler = new helper_plugin_move_handler($id, $moves, $media_moves, $handlers); //add modes to parser foreach($modes as $mode) { @@ -820,14 +820,14 @@ public function getNSMoveButton($action, $id = NULL) { $id = $ID; } - $class = 'pagemove__nsform'; + $class = 'move__nsform'; switch ($action) { case 'continue': case 'tryagain': - $class .= ' pagemove__nscontinue'; + $class .= ' move__nscontinue'; break; case 'skip': - $class .= ' pagemove__nsskip'; + $class .= ' move__nsskip'; break; } @@ -860,9 +860,9 @@ public function getNSMoveButton($action, $id = NULL) { } /** - * Indexer class extended by pagemove features, only needed and used in releases older than Spring 2013 + * Indexer class extended by move features, only needed and used in releases older than Spring 2013 */ -class helper_plugin_pagemove_indexer extends Doku_Indexer { +class helper_plugin_move_indexer extends Doku_Indexer { /** * Rename a page in the search index without changing the indexed content * @@ -963,9 +963,9 @@ public function renameMetaValue($key, $oldvalue, $newvalue) { } /** - * Handler class for pagemove. It does the actual rewriting of the content. + * Handler class for move. It does the actual rewriting of the content. */ -class helper_plugin_pagemove_handler { +class helper_plugin_move_handler { public $calls = ''; public $id; public $ns; @@ -976,7 +976,7 @@ class helper_plugin_pagemove_handler { private $handlers; /** - * Construct the pagemove handler. + * Construct the move handler. * * @param string $id The id of the text that is passed to the handler * @param array $moves Moves that shall be considered in the form $old => $new ($old can be $id) diff --git a/lang/cs/pagemove.txt b/lang/cs/move.txt similarity index 95% rename from lang/cs/pagemove.txt rename to lang/cs/move.txt index 3e1c958..d91f12d 100644 --- a/lang/cs/pagemove.txt +++ b/lang/cs/move.txt @@ -1,4 +1,4 @@ -====== Pagemove ====== +====== Move ====== Pomocí tohoto pluginu lze přesunout nebo přejmenovat aktuální stránku. Platí však jistá omezení: diff --git a/lang/de/lang.php b/lang/de/lang.php index b3f5559..15417d9 100644 --- a/lang/de/lang.php +++ b/lang/de/lang.php @@ -29,7 +29,7 @@ $lang['pm_renamed'] = 'Seitename wurde von %s auf %s geändert'; $lang['pm_moved'] = 'Seite von %s nach %s verschoben'; $lang['pm_move_rename'] = 'Seite von %s nach %s verschoben und umbenannt'; -$lang['pm_delete'] = 'Gelöscht durch das pagemove Plugin'; +$lang['pm_delete'] = 'Gelöscht durch das move Plugin'; $lang['pm_norights'] = 'Sie haben unzureichende Rechte um %s zu bearbeiten.'; $lang['pm_nomediarights'] = 'Sie haben unzureichende Rechte, um die Mediendatei %s zu löschen.'; $lang['pm_notargetperms'] = 'Sie haben nicht die Berechtigung, die Seite %s anzulegen.'; diff --git a/lang/de/pagemove.txt b/lang/de/move.txt similarity index 100% rename from lang/de/pagemove.txt rename to lang/de/move.txt diff --git a/lang/en/lang.php b/lang/en/lang.php index 10280f9..5549b05 100644 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -29,13 +29,13 @@ $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_delete'] = 'Deleted by PageMove plugin'; +$lang['pm_delete'] = 'Deleted by move plugin'; $lang['pm_norights'] = 'You have insufficient permissions to edit %s.'; $lang['pm_nomediarights'] = 'You have insufficient permissions to delete %s.'; $lang['pm_notargetperms'] = 'You don\'t have the permission to create the page %s.'; $lang['pm_nomediatargetperms'] = 'You don\'t have the permission to create the media file %s.'; $lang['pm_filelocked'] = 'The page %s is locked. Try again later.'; -$lang['pm_linkchange'] = 'Links adapted because of a pagemove operation'; +$lang['pm_linkchange'] = 'Links adapted because of a move operation'; $lang['pm_ns_move_in_progress'] = 'There is currently a namespace move of %s page and %s media files from namespace %s to namespace %s in progress.'; $lang['pm_ns_move_continue'] = 'Continue the namespace move'; diff --git a/lang/en/pagemove.txt b/lang/en/move.txt similarity index 96% rename from lang/en/pagemove.txt rename to lang/en/move.txt index cfc7faa..59bceff 100644 --- a/lang/en/pagemove.txt +++ b/lang/en/move.txt @@ -1,4 +1,4 @@ -====== Pagemove ====== +====== Move ====== This plugin allows you to move and/or rename the current page or move and/or rename the current namespace within the following restrictions: diff --git a/lang/es/pagemove.txt b/lang/es/move.txt similarity index 96% rename from lang/es/pagemove.txt rename to lang/es/move.txt index 16f5035..d1f364f 100644 --- a/lang/es/pagemove.txt +++ b/lang/es/move.txt @@ -1,4 +1,4 @@ -====== Pagemove ====== +====== Move ====== Esta extensión le permite mover y/o renombrar el documento actual respetando las siguientes restricciones. diff --git a/lang/fr/pagemove.txt b/lang/fr/move.txt similarity index 96% rename from lang/fr/pagemove.txt rename to lang/fr/move.txt index 5e588bc..f9a5c69 100644 --- a/lang/fr/pagemove.txt +++ b/lang/fr/move.txt @@ -1,4 +1,4 @@ -====== Pagemove ====== +====== Move ====== Ce plugin permet de déplacer et/ou renommer le document courant, avec les limitations suivantes : * Il faut avoir les droits d'édition sur le document diff --git a/lang/lv/pagemove.txt b/lang/lv/move.txt similarity index 100% rename from lang/lv/pagemove.txt rename to lang/lv/move.txt diff --git a/lang/nl/pagemove.txt b/lang/nl/move.txt similarity index 100% rename from lang/nl/pagemove.txt rename to lang/nl/move.txt diff --git a/lang/pl/pagemove.txt b/lang/pl/move.txt similarity index 95% rename from lang/pl/pagemove.txt rename to lang/pl/move.txt index 73705f0..f20ba9e 100644 --- a/lang/pl/pagemove.txt +++ b/lang/pl/move.txt @@ -1,4 +1,4 @@ -====== Pagemove ====== +====== Move ====== Ta wtyczka umożliwia przeniesienie lub zmianę nazwy dokumentu z poniższymi zastrzeżeniami: diff --git a/lang/ru/pagemove.txt b/lang/ru/move.txt similarity index 100% rename from lang/ru/pagemove.txt rename to lang/ru/move.txt diff --git a/lang/sl/pagemove.txt b/lang/sl/move.txt similarity index 95% rename from lang/sl/pagemove.txt rename to lang/sl/move.txt index c466208..b856c15 100644 --- a/lang/sl/pagemove.txt +++ b/lang/sl/move.txt @@ -1,4 +1,4 @@ -====== Pagemove ====== +====== Move ====== Ta plugin omogoča premikanje in/ali preimenovanje trenutnega dokumenta v okviru naslednjih omejitev: diff --git a/plugin.info.txt b/plugin.info.txt index 233e5d9..9927193 100644 --- a/plugin.info.txt +++ b/plugin.info.txt @@ -1,7 +1,7 @@ -base pagemove +base move author Michael Hamann, Gary Owen, Arno Puschmann, Christoph Jähnigen email michael@content-space.de date 2013-10-29 -name Pagemove plugin -desc Move and rename pages and namespaces whilst maintaining the links. -url http://www.dokuwiki.org/plugin:pagemove +name Move plugin +desc Move and rename pages and media files whilst maintaining the links. +url http://www.dokuwiki.org/plugin:move diff --git a/script.js b/script.js index 39bd671..de828b1 100644 --- a/script.js +++ b/script.js @@ -1,11 +1,11 @@ /** - * JavasScript code for the preview in the pagemove plugin + * JavasScript code for the preview in the move plugin * * @author Michael Hamann */ jQuery(function() { - jQuery('form.pagemove__form').each(function() { + jQuery('form.move__form').each(function() { var $this = jQuery(this); var $preview = jQuery('

'); $this.find('input[type=submit]').before($preview); @@ -19,7 +19,7 @@ jQuery(function() { } else { previewns = targetns + ':' + newnsname; } - $preview.text(LANG['plugins']['pagemove']['pm_previewns'].replace('OLDNS', JSINFO['namespace']).replace('NEWNS', previewns)); + $preview.text(LANG['plugins']['move']['pm_previewns'].replace('OLDNS', JSINFO['namespace']).replace('NEWNS', previewns)); } else { var ns_for_page = $this.find('select[name=ns_for_page]').val(); var newns = $this.find('input[name=newns]').val(); @@ -34,7 +34,7 @@ jQuery(function() { newid = ns_for_page + ':'; } newid += newname; - $preview.text(LANG['plugins']['pagemove']['pm_previewpage'].replace('OLDPAGE', JSINFO['id']).replace('NEWPAGE', newid)); + $preview.text(LANG['plugins']['move']['pm_previewpage'].replace('OLDPAGE', JSINFO['id']).replace('NEWPAGE', newid)); } }; @@ -43,9 +43,9 @@ jQuery(function() { $this.find('input').keyup(updatePreview); }); - jQuery('form.pagemove__nscontinue').each(function() { + jQuery('form.move__nscontinue').each(function() { var $this = jQuery(this); - var $container = jQuery('div.plugin__pagemove_forms'); + var $container = jQuery('div.plugin__move_forms'); var submit_handler = function() { $container.empty(); var $progressbar = jQuery('
'); @@ -53,13 +53,13 @@ jQuery(function() { $progressbar.progressbar({value: false}); var $message = jQuery('
'); $container.append($message); - var skip = jQuery(this).hasClass('pagemove__nsskip'); + var skip = jQuery(this).hasClass('move__nsskip'); var continue_move = function() { jQuery.post( DOKU_BASE + 'lib/exe/ajax.php', { - call: 'plugin_pagemove_ns_continue', + call: 'plugin_move_ns_continue', id: JSINFO['id'], skip: skip }, @@ -72,7 +72,7 @@ jQuery(function() { } $message.html(data.html); if (data.remaining === false) { - $container.find('form.pagemove__nscontinue, form.pagemove__nsskip').submit(submit_handler); + $container.find('form.move__nscontinue, form.move__nsskip').submit(submit_handler); } else if (data.remaining === 0) { window.location.href = data.redirect_url; } else {