wp_reset_vars(). Props Sewar. fixes #2888

git-svn-id: http://svn.automattic.com/wordpress/trunk@3956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-07-04 19:31:28 +00:00
parent 14abe71841
commit 00b5713e5d
1 changed files with 1 additions and 15 deletions

View File

@ -3,22 +3,8 @@ require_once('admin.php');
$parent_file = 'edit.php';
$submenu_file = 'edit-comments.php';
$wpvarstoreset = array('action');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($_POST["$wpvar"])) {
if (empty($_GET["$wpvar"])) {
$$wpvar = '';
} else {
$$wpvar = $_GET["$wpvar"];
}
} else {
$$wpvar = $_POST["$wpvar"];
}
}
}
wp_reset_vars(array('action'));
if ( isset( $_POST['deletecomment'] ) )
$action = 'deletecomment';