wp_reset_vars() from Sewar. fixes #2888

git-svn-id: https://develop.svn.wordpress.org/trunk@3946 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-07-03 19:03:37 +00:00
parent ca3001538e
commit 0474f077f0
16 changed files with 32 additions and 232 deletions

View File

@@ -4,21 +4,7 @@ require_once('admin.php');
$title = __("Edit Plugins");
$parent_file = 'plugins.php';
$wpvarstoreset = array('action','redirect','profile','error','warning','a','file');
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', 'redirect', 'profile', 'error', 'warning', 'a', 'file'));
$plugins = get_plugins();
$plugin_files = array_keys($plugins);