Skip to content

Commit

Permalink
Cleanup: rename function, remove useless code, update documentation
Browse files Browse the repository at this point in the history
Namespace cleanup isn't needed, DokuWiki tries to clean the namespace
when the page is deleted.
  • Loading branch information
michitux committed Dec 30, 2012
1 parent f970892 commit 38d04ae
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand All @@ -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;
}
}
}
Expand Down

0 comments on commit 38d04ae

Please sign in to comment.