-
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.
Cleanup: rename function, remove useless code, update documentation
Namespace cleanup isn't needed, DokuWiki tries to clean the namespace when the page is deleted.
- Loading branch information
Showing
1 changed file
with
4 additions
and
8 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 |
---|---|---|
|
@@ -62,21 +62,23 @@ function getMenuText() { | |
/** | ||
* output appropriate html | ||
* | ||
* @author Michael Hamann <[email protected]> | ||
* @author Gary Owen <[email protected]> | ||
*/ | ||
function html() { | ||
ptln('<!-- Pagemove Plugin start -->'); | ||
ptln( $this->locale_xhtml('pagemove') ); | ||
$this->_pm_form(); | ||
$this->printForm(); | ||
ptln('<!-- Pagemove Plugin end -->'); | ||
} | ||
|
||
/** | ||
* show the move and/or rename a page form | ||
* | ||
* @author Michael Hamann <[email protected]> | ||
* @author Gary Owen <[email protected]> | ||
*/ | ||
function _pm_form() { | ||
function printForm() { | ||
global $ID; | ||
|
||
$ns = getNS($ID); | ||
|
@@ -184,8 +186,6 @@ function handle() { | |
$helper->move_namespace($this->opts)) { | ||
$ID = $helper->getNewID($INFO['id'], $this->opts['ns'], $this->opts['newns']); | ||
$ACT = 'show'; | ||
} else { | ||
return; | ||
} | ||
} else { | ||
// check that the pagename is valid | ||
|
@@ -199,13 +199,9 @@ function handle() { | |
} | ||
|
||
if ($helper->move_page($this->opts)) { | ||
// @todo if the namespace is now empty, delete it | ||
|
||
// Set things up to display the new page. | ||
$ID = $this->opts['new_id']; | ||
$ACT = 'show'; // this triggers a redirect to the page | ||
} else { | ||
return; | ||
} | ||
} | ||
} | ||
|