Make WordPress Core


Ignore:
Timestamp:
04/20/2004 10:56:47 PM (21 years ago)
Author:
saxmatt
Message:

Changed to superglobals, and eliminated $use_cache (since we always do).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/categories.php

    r1076 r1108  
    1515
    1616if (!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);
    2020}
    2121
     
    2424    $wpvar = $wpvarstoreset[$i];
    2525    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"])) {
    2828                $$wpvar = '';
    2929            } else {
    30                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     30                $$wpvar = $_GET["$wpvar"];
    3131            }
    3232        } else {
    33             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     33            $$wpvar = $_POST["$wpvar"];
    3434        }
    3535    }
     
    4646        die ('Cheatin’ uh?');
    4747   
    48     $cat_name= addslashes(stripslashes(stripslashes($HTTP_POST_VARS['cat_name'])));
     48    $cat_name= addslashes(stripslashes(stripslashes($_POST['cat_name'])));
    4949    $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']);
    5252
    5353    $wpdb->query("INSERT INTO $tablecategories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')");
     
    6262    require_once('admin-header.php');
    6363
    64     $cat_ID = intval($HTTP_GET_VARS["cat_ID"]);
     64    $cat_ID = intval($_GET["cat_ID"]);
    6565    $cat_name = get_catname($cat_ID);
    6666    $cat_name = addslashes($cat_name);
     
    8585
    8686    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']);
    8888    $cat_name = stripslashes($category->cat_name);
    8989    ?>
     
    9393    <form name="editcat" action="categories.php" method="post">
    9494        <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'] ?>" />
    9696        <p>Category name:<br />
    9797        <input type="text" name="cat_name" value="<?php echo $cat_name; ?>" /></p>
     
    120120        die ('Cheatin&#8217; uh?');
    121121   
    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']);
    124124    $category_nicename = sanitize_title($cat_name);
    125     $category_description = $HTTP_POST_VARS['category_description'];
     125    $category_description = $_POST['category_description'];
    126126
    127127    $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.