Update of /cvsroot/phpwiki/phpwiki
In directory slayer.i.sourceforge.net:/tmp/cvs-serv17320
Modified Files:
admin.php
Log Message:
Added safety step for 'remove page' feature
Index: admin.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/admin.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** admin.php 2000/11/08 16:48:34 1.3
--- admin.php 2000/11/09 16:29:10 1.4
***************
*** 42,51 ****
include ('admin/loadserial.php');
} elseif (isset($remove)) {
if (function_exists('RemovePage')) {
! if (get_magic_quotes_gpc())
! $remove = stripslashes($remove);
! RemovePage($dbi, $remove);
! $html = "Removed page '" . htmlspecialchars($remove)
! ."' successfully.'";
} else {
$html = "Function not yet implemented.";
--- 42,52 ----
include ('admin/loadserial.php');
} elseif (isset($remove)) {
+ if (get_magic_quotes_gpc())
+ $remove = stripslashes($remove);
if (function_exists('RemovePage')) {
! $html .= "You are about to remove '" . htmlspecialchars($remove)
! . "' permanently!<P>Click <A HREF=\"$ScriptUrl?removeok="
! . rawurlencode($remove) . "\">here</A> to remove the page now."
! . "<P>Otherwise press the \"Back\" button of your browser.";
} else {
$html = "Function not yet implemented.";
***************
*** 53,57 ****
--- 54,66 ----
GeneratePage('MESSAGE', $html, 'Remove page', 0);
ExitWiki('');
+ } elseif (isset($removeok)) {
+ if (get_magic_quotes_gpc())
+ $removeok = stripslashes($removeok);
+ RemovePage($dbi, $removeok);
+ $html = "Removed page '".htmlspecialchars($removeok)."' successfully.'";
+ GeneratePage('MESSAGE', $html, 'Removed page', 0);
+ ExitWiki('');
}
+
include('index.php');
?>
|