示例#1
0
 function action_remove()
 {
     // This check is now redundant.
     //$user->requireAuth(WIKIAUTH_ADMIN);
     $pagename = $this->getArg('pagename');
     if (strstr($pagename, _("PhpWikiAdministration"))) {
         $this->action_browse();
     } else {
         include 'lib/removepage.php';
         RemovePage($this);
     }
 }
示例#2
0
    ExitWiki('');
} elseif (isset($dumpserial)) {
    include 'w_admin/dumpserial.php';
} elseif (isset($loadserial)) {
    include 'w_admin/loadserial.php';
} elseif (isset($remove)) {
    if (get_magic_quotes_gpc()) {
        $remove = stripslashes($remove);
    }
    if (function_exists('RemovePage')) {
        $html .= sprintf(gettext("You are about to remove '%s' permanently!"), htmlspecialchars($remove));
        $html .= "\n<P>";
        $url = rawurlencode($remove);
        $html .= sprintf(gettext("Click %shere%s to remove the page now."), "<A HREF=\"{$ScriptUrl}?removeok={$url}\">", "</A>");
        $html .= "\n<P>";
        $html .= gettext("Otherwise press the \"Back\" button of your browser.");
    } else {
        $html = gettext("Function not yet implemented.");
    }
    GeneratePage('MESSAGE', $html, gettext("Remove page"), 0);
    ExitWiki('');
} elseif (isset($removeok)) {
    if (get_magic_quotes_gpc()) {
        $removeok = stripslashes($removeok);
    }
    RemovePage($dbi, $removeok);
    $html = sprintf(gettext("Removed page '%s' succesfully."), htmlspecialchars($removeok));
    GeneratePage('MESSAGE', $html, gettext("Remove page"), 0);
    ExitWiki('');
}
include 'wiki.php';