Changeset 1108 for trunk/wp-admin/categories.php
- Timestamp:
- 04/20/2004 10:56:47 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/categories.php
r1076 r1108 15 15 16 16 if (!get_magic_quotes_gpc()) { 17 $ HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);18 $ HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);19 $ HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);17 $_GET = add_magic_quotes($_GET); 18 $_POST = add_magic_quotes($_POST); 19 $_COOKIE = add_magic_quotes($_COOKIE); 20 20 } 21 21 … … 24 24 $wpvar = $wpvarstoreset[$i]; 25 25 if (!isset($$wpvar)) { 26 if (empty($ HTTP_POST_VARS["$wpvar"])) {27 if (empty($ HTTP_GET_VARS["$wpvar"])) {26 if (empty($_POST["$wpvar"])) { 27 if (empty($_GET["$wpvar"])) { 28 28 $$wpvar = ''; 29 29 } else { 30 $$wpvar = $ HTTP_GET_VARS["$wpvar"];30 $$wpvar = $_GET["$wpvar"]; 31 31 } 32 32 } else { 33 $$wpvar = $ HTTP_POST_VARS["$wpvar"];33 $$wpvar = $_POST["$wpvar"]; 34 34 } 35 35 } … … 46 46 die ('Cheatin’ uh?'); 47 47 48 $cat_name= addslashes(stripslashes(stripslashes($ HTTP_POST_VARS['cat_name'])));48 $cat_name= addslashes(stripslashes(stripslashes($_POST['cat_name']))); 49 49 $category_nicename = sanitize_title($cat_name); 50 $category_description = addslashes(stripslashes(stripslashes($ HTTP_POST_VARS['category_description'])));51 $cat = intval($ HTTP_POST_VARS['cat']);50 $category_description = addslashes(stripslashes(stripslashes($_POST['category_description']))); 51 $cat = intval($_POST['cat']); 52 52 53 53 $wpdb->query("INSERT INTO $tablecategories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')"); … … 62 62 require_once('admin-header.php'); 63 63 64 $cat_ID = intval($ HTTP_GET_VARS["cat_ID"]);64 $cat_ID = intval($_GET["cat_ID"]); 65 65 $cat_name = get_catname($cat_ID); 66 66 $cat_name = addslashes($cat_name); … … 85 85 86 86 require_once ('admin-header.php'); 87 $category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = " . $ HTTP_GET_VARS['cat_ID']);87 $category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = " . $_GET['cat_ID']); 88 88 $cat_name = stripslashes($category->cat_name); 89 89 ?> … … 93 93 <form name="editcat" action="categories.php" method="post"> 94 94 <input type="hidden" name="action" value="editedcat" /> 95 <input type="hidden" name="cat_ID" value="<?php echo $ HTTP_GET_VARS['cat_ID'] ?>" />95 <input type="hidden" name="cat_ID" value="<?php echo $_GET['cat_ID'] ?>" /> 96 96 <p>Category name:<br /> 97 97 <input type="text" name="cat_name" value="<?php echo $cat_name; ?>" /></p> … … 120 120 die ('Cheatin’ uh?'); 121 121 122 $cat_name = addslashes(stripslashes(stripslashes($ HTTP_POST_VARS['cat_name'])));123 $cat_ID = addslashes($ HTTP_POST_VARS['cat_ID']);122 $cat_name = addslashes(stripslashes(stripslashes($_POST['cat_name']))); 123 $cat_ID = addslashes($_POST['cat_ID']); 124 124 $category_nicename = sanitize_title($cat_name); 125 $category_description = $ HTTP_POST_VARS['category_description'];125 $category_description = $_POST['category_description']; 126 126 127 127 $wpdb->query("UPDATE $tablecategories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = $cat WHERE cat_ID = $cat_ID");
Note: See TracChangeset
for help on using the changeset viewer.