mirror of
git://develop.git.wordpress.org/
synced 2025-02-24 16:43:06 +01:00
wp_reset_vars(). Props Sewar. fixes #2888
git-svn-id: https://develop.svn.wordpress.org/trunk@3956 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1534405764
commit
3e6f4c5c70
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user