-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed the pagemove plugin to "move"
Note that all class and event names that contained the name "pagemove" have been renamed to the same name without "page".
- Loading branch information
Showing
22 changed files
with
110 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
A DokuWiki pagemove plugin | ||
A DokuWiki move plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,10 @@ | |
* | ||
* @author Michael Hamann <[email protected]> | ||
*/ | ||
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(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* Plugin : Pagemove | ||
* Plugin : Move | ||
* | ||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html) | ||
* @author Michael Hamann <[email protected]> | ||
|
@@ -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,15 +101,15 @@ 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) | ||
*/ | ||
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']; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* Plugin : Pagemove | ||
* Plugin : Move | ||
* | ||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html) | ||
* @author Michael Hamann <[email protected]> | ||
|
@@ -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('<!-- Pagemove Plugin start -->'); | ||
ptln( $this->locale_xhtml('pagemove') ); | ||
ptln('<div class="plugin__pagemove_forms">'); | ||
ptln('<!-- Mmove Plugin start -->'); | ||
ptln( $this->locale_xhtml('move') ); | ||
ptln('<div class="plugin__move_forms">'); | ||
|
||
switch ($this->ns_move_state) { | ||
case 'started': | ||
|
@@ -100,7 +100,7 @@ function html() { | |
$this->printForm(); | ||
} | ||
ptln('</div>'); | ||
ptln('<!-- Pagemove Plugin end -->'); | ||
ptln('<!-- Move Plugin end -->'); | ||
} | ||
|
||
/** | ||
|
@@ -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('</fieldset>'); | ||
} 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(); | ||
|
Oops, something went wrong.