Make WordPress Core

Changeset 1108


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

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

Location:
trunk
Files:
49 edited

Legend:

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

    r1106 r1108  
    1111}
    1212
    13 if (!isset($use_cache))    $use_cache=1;
    1413if (!isset($blogID))    $blog_ID=1;
    1514if (!isset($debug))        $debug=0;
     
    3837    $wpvar = $wpvarstoreset[$i];
    3938    if (!isset($$wpvar)) {
    40         if (empty($HTTP_POST_VARS["$wpvar"])) {
    41             if (empty($HTTP_GET_VARS["$wpvar"])) {
     39        if (empty($_POST["$wpvar"])) {
     40            if (empty($_GET["$wpvar"])) {
    4241                $$wpvar = '';
    4342            } else {
    44                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     43                $$wpvar = $_GET["$wpvar"];
    4544            }
    4645        } else {
    47             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     46            $$wpvar = $_POST["$wpvar"];
    4847        }
    4948    }
  • 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");
  • trunk/wp-admin/edit-form-advanced.php

    r1038 r1108  
    167167}
    168168?>
    169     <input name="referredby" type="hidden" id="referredby" value="<?php echo $HTTP_SERVER_VARS['HTTP_REFERER']; ?>" />
     169    <input name="referredby" type="hidden" id="referredby" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
    170170</p>
    171171<?php
  • trunk/wp-admin/edit-form-comment.php

    r1100 r1108  
    7272
    7373<p class="submit"><input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
    74   <input name="referredby" type="hidden" id="referredby" value="<?php echo $HTTP_SERVER_VARS['HTTP_REFERER']; ?>" />
     74  <input name="referredby" type="hidden" id="referredby" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
    7575</p>
    7676
  • trunk/wp-admin/edit-form.php

    r1106 r1108  
    110110      echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' .  __('Advanced Editing &raquo;') . '" />';
    111111  } ?>
    112   <input name="referredby" type="hidden" id="referredby" value="<?php echo $HTTP_SERVER_VARS['HTTP_REFERER']; ?>" />
     112  <input name="referredby" type="hidden" id="referredby" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
    113113</p>
    114114
  • trunk/wp-admin/import-b2.php

    r763 r1108  
    33require_once('../wp-config.php');
    44require('upgrade-functions.php');
    5 $step = $HTTP_GET_VARS['step'];
     5$step = $_GET['step'];
    66if (!$step) $step = 0;
    77?>
  • trunk/wp-admin/import-blogger.php

    r784 r1108  
    55    $wpvar = $wpvarstoreset[$i];
    66    if (!isset($$wpvar)) {
    7         if (empty($HTTP_POST_VARS["$wpvar"])) {
    8             if (empty($HTTP_GET_VARS["$wpvar"])) {
     7        if (empty($_POST["$wpvar"])) {
     8            if (empty($_GET["$wpvar"])) {
    99                $$wpvar = '';
    1010            } else {
    11                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     11                $$wpvar = $_GET["$wpvar"];
    1212            }
    1313        } else {
    14             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     14            $$wpvar = $_POST["$wpvar"];
    1515        }
    1616    }
  • trunk/wp-admin/import-greymatter.php

    r957 r1108  
    1313    $wpvar = $wpvarstoreset[$i];
    1414    if (!isset($$wpvar)) {
    15         if (empty($HTTP_POST_VARS["$wpvar"])) {
    16             if (empty($HTTP_GET_VARS["$wpvar"])) {
     15        if (empty($_POST["$wpvar"])) {
     16            if (empty($_GET["$wpvar"])) {
    1717                $$wpvar = '';
    1818            } else {
    19                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     19                $$wpvar = $_GET["$wpvar"];
    2020            }
    2121        } else {
    22             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     22            $$wpvar = $_POST["$wpvar"];
    2323        }
    2424    }
  • trunk/wp-admin/import-mt.php

    r1059 r1108  
    66require('../wp-config.php');
    77
    8 $step = $HTTP_GET_VARS['step'];
     8$step = $_GET['step'];
    99if (!$step) $step = 0;
    1010?>
  • trunk/wp-admin/import-textpattern.php

    r813 r1108  
    1212require('upgrade-functions.php');
    1313
    14 $step = $HTTP_GET_VARS['step'];
     14$step = $_GET['step'];
    1515if (!$step) $step = 0;
    1616?>
  • trunk/wp-admin/install-config.php

    r964 r1108  
    1111if (!is_writable('../')) die("Sorry, I can't write to the directory. You'll have to either change the permissions on your WordPress directory or create your wp-config.php manually.");
    1212
    13 $step = $HTTP_GET_VARS['step'];
     13$step = $_GET['step'];
    1414if (!$step) $step = 0;
    1515?>
     
    105105   
    106106    case 2:
    107     $dbname = $HTTP_POST_VARS['dbname'];
    108     $uname = $HTTP_POST_VARS['uname'];
    109     $passwrd = $HTTP_POST_VARS['pwd'];
    110     $dbhost = $HTTP_POST_VARS['dbhost'];
    111     $prefix = $HTTP_POST_VARS['prefix'];
     107    $dbname = $_POST['dbname'];
     108    $uname = $_POST['uname'];
     109    $passwrd = $_POST['pwd'];
     110    $dbhost = $_POST['dbhost'];
     111    $prefix = $_POST['prefix'];
    112112    if (empty($prefix)) $prefix = 'wp_';
    113113
  • trunk/wp-admin/install.php

    r1100 r1108  
    55require('upgrade-functions.php');
    66
    7 $step = $HTTP_GET_VARS['step'];
     7$step = $_GET['step'];
    88if (!$step) $step = 0;
    99?>
  • trunk/wp-admin/link-add.php

    r1100 r1108  
    3333}
    3434if (!get_magic_quotes_gpc()) {
    35     $HTTP_GET_VARS    = add_magic_quotes($HTTP_GET_VARS);
    36     $HTTP_POST_VARS   = add_magic_quotes($HTTP_POST_VARS);
    37     $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
     35    $_GET    = add_magic_quotes($_GET);
     36    $_POST   = add_magic_quotes($_POST);
     37    $_COOKIE = add_magic_quotes($_COOKIE);
    3838}
    3939
     
    4545    $wpvar = $wpvarstoreset[$i];
    4646    if (!isset($$wpvar)) {
    47         if (empty($HTTP_POST_VARS["$wpvar"])) {
    48             if (empty($HTTP_GET_VARS["$wpvar"])) {
     47        if (empty($_POST["$wpvar"])) {
     48            if (empty($_GET["$wpvar"])) {
    4949                $$wpvar = '';
    5050            } else {
    51                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     51                $$wpvar = $_GET["$wpvar"];
    5252            }
    5353        } else {
    54             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     54            $$wpvar = $_POST["$wpvar"];
    5555        }
    5656    }
    5757}
    58 $link_url = stripslashes($HTTP_GET_VARS['linkurl']);
    59 $link_name = htmlentities(stripslashes(urldecode($HTTP_GET_VARS['name'])));
     58$link_url = stripslashes($_GET['linkurl']);
     59$link_name = htmlentities(stripslashes(urldecode($_GET['name'])));
    6060
    6161require('admin-header.php');
  • trunk/wp-admin/link-import.php

    r1107 r1108  
    99$this_file = 'link-import.php';
    1010
    11 $step = $HTTP_POST_VARS['step'];
     11$step = $_POST['step'];
    1212if (!$step) $step = 0;
    1313?>
     
    8989     <h2>Importing...</h2>
    9090<?php
    91                 $cat_id = $HTTP_POST_VARS['cat_id'];
     91                $cat_id = $_POST['cat_id'];
    9292                if (($cat_id == '') || ($cat_id == 0)) {
    9393                    $cat_id  = 1;
    9494                }
    9595
    96                 $opml_url = $HTTP_POST_VARS['opml_url'];
     96                $opml_url = $_POST['opml_url'];
    9797                if (isset($opml_url) && $opml_url != '') {
    9898                    $blogrolling = true;
  • trunk/wp-admin/link-manager.php

    r1100 r1108  
    4848}
    4949if (!get_magic_quotes_gpc()) {
    50     $HTTP_GET_VARS    = add_magic_quotes($HTTP_GET_VARS);
    51     $HTTP_POST_VARS   = add_magic_quotes($HTTP_POST_VARS);
    52     $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
     50    $_GET    = add_magic_quotes($_GET);
     51    $_POST   = add_magic_quotes($_POST);
     52    $_COOKIE = add_magic_quotes($_COOKIE);
    5353}
    5454
     
    6161    $wpvar = $wpvarstoreset[$i];
    6262    if (!isset($$wpvar)) {
    63         if (empty($HTTP_POST_VARS["$wpvar"])) {
    64             if (empty($HTTP_GET_VARS["$wpvar"])) {
     63        if (empty($_POST["$wpvar"])) {
     64            if (empty($_GET["$wpvar"])) {
    6565                $$wpvar = '';
    6666            } else {
    67                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     67                $$wpvar = $_GET["$wpvar"];
    6868            }
    6969        } else {
    70             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     70            $$wpvar = $_POST["$wpvar"];
    7171        }
    7272    }
    7373}
    7474
    75 $links_show_cat_id = $HTTP_COOKIE_VARS['links_show_cat_id_' . $cookiehash];
    76 $links_show_order = $HTTP_COOKIE_VARS['links_show_order_' . $cookiehash];
     75$links_show_cat_id = $_COOKIE['links_show_cat_id_' . $cookiehash];
     76$links_show_order = $_COOKIE['links_show_order_' . $cookiehash];
    7777
    7878if (!empty($action2)) {
     
    176176    include_once('admin-header.php');
    177177
    178     $link_url = $HTTP_POST_VARS['linkurl'];
    179     $link_name = $HTTP_POST_VARS['name'];
    180     $link_image = $HTTP_POST_VARS['image'];
    181     $link_target = $HTTP_POST_VARS['target'];
    182     $link_category = $HTTP_POST_VARS['category'];
    183     $link_description = $HTTP_POST_VARS['description'];
    184     $link_visible = $HTTP_POST_VARS['visible'];
    185     $link_rating = $HTTP_POST_VARS['rating'];
    186     $link_rel = $HTTP_POST_VARS['rel'];
    187     $link_notes = $HTTP_POST_VARS['notes'];
    188     $link_rss_uri =  $HTTP_POST_VARS['rss_uri'];
     178    $link_url = $_POST['linkurl'];
     179    $link_name = $_POST['name'];
     180    $link_image = $_POST['image'];
     181    $link_target = $_POST['target'];
     182    $link_category = $_POST['category'];
     183    $link_description = $_POST['description'];
     184    $link_visible = $_POST['visible'];
     185    $link_rating = $_POST['rating'];
     186    $link_rel = $_POST['rel'];
     187    $link_notes = $_POST['notes'];
     188    $link_rss_uri =  $_POST['rss_uri'];
    189189    $auto_toggle = get_autotoggle($link_category);
    190190
     
    203203           . addslashes($link_description) . "', '$link_visible', $user_ID, $link_rating, '" . addslashes($link_rel) . "', '" . addslashes($link_notes) . "', '$link_rss_uri')");
    204204
    205     header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
     205    header('Location: ' . $_SERVER['HTTP_REFERER']);
    206206    break;
    207207  } // end Add
     
    223223      include_once('admin-header.php');
    224224
    225       $link_id = $HTTP_POST_VARS['link_id'];
    226       $link_url = $HTTP_POST_VARS['linkurl'];
    227       $link_name = $HTTP_POST_VARS['name'];
    228       $link_image = $HTTP_POST_VARS['image'];
    229       $link_target = $HTTP_POST_VARS['target'];
    230       $link_category = $HTTP_POST_VARS['category'];
    231       $link_description = $HTTP_POST_VARS['description'];
    232       $link_visible = $HTTP_POST_VARS['visible'];
    233       $link_rating = $HTTP_POST_VARS['rating'];
    234       $link_rel = $HTTP_POST_VARS['rel'];
    235       $link_notes = $HTTP_POST_VARS['notes'];
    236       $link_rss_uri =  $HTTP_POST_VARS['rss_uri'];
     225      $link_id = $_POST['link_id'];
     226      $link_url = $_POST['linkurl'];
     227      $link_name = $_POST['name'];
     228      $link_image = $_POST['image'];
     229      $link_target = $_POST['target'];
     230      $link_category = $_POST['category'];
     231      $link_description = $_POST['description'];
     232      $link_visible = $_POST['visible'];
     233      $link_rating = $_POST['rating'];
     234      $link_rel = $_POST['rel'];
     235      $link_notes = $_POST['notes'];
     236      $link_rss_uri =  $_POST['rss_uri'];
    237237      $auto_toggle = get_autotoggle($link_category);
    238238
     
    266266    include_once('admin-header.php');
    267267
    268     $link_id = $HTTP_GET_VARS["link_id"];
     268    $link_id = $_GET["link_id"];
    269269
    270270    if ($user_level < get_settings('links_minadminlevel'))
     
    526526  case "popup":
    527527  {
    528     $link_url = stripslashes($HTTP_GET_VARS["linkurl"]);
    529     $link_name = stripslashes($HTTP_GET_VARS["name"]);
     528    $link_url = stripslashes($_GET["linkurl"]);
     529    $link_name = stripslashes($_GET["name"]);
    530530    //break; fall through
    531531  }
  • trunk/wp-admin/moderation.php

    r1075 r1108  
    1616
    1717if (!get_magic_quotes_gpc()) {
    18     $HTTP_GET_VARS    = add_magic_quotes($HTTP_GET_VARS);
    19     $HTTP_POST_VARS   = add_magic_quotes($HTTP_POST_VARS);
    20     $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
     18    $_GET    = add_magic_quotes($_GET);
     19    $_POST   = add_magic_quotes($_POST);
     20    $_COOKIE = add_magic_quotes($_COOKIE);
    2121}
    2222
     
    2525    $wpvar = $wpvarstoreset[$i];
    2626    if (!isset($$wpvar)) {
    27         if (empty($HTTP_POST_VARS["$wpvar"])) {
    28             if (empty($HTTP_GET_VARS["$wpvar"])) {
     27        if (empty($_POST["$wpvar"])) {
     28            if (empty($_GET["$wpvar"])) {
    2929                $$wpvar = '';
    3030            } else {
    31                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     31                $$wpvar = $_GET["$wpvar"];
    3232            }
    3333        } else {
    34             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     34            $$wpvar = $_POST["$wpvar"];
    3535        }
    3636    }
     
    3838
    3939$comment = array();
    40 if (isset($HTTP_POST_VARS["comment"])) {
    41     foreach ($HTTP_POST_VARS["comment"] as $k => $v) {
     40if (isset($_POST["comment"])) {
     41    foreach ($_POST["comment"] as $k => $v) {
    4242        $comment[intval($k)] = $v;
    4343    }
  • trunk/wp-admin/options-discussion.php

    r1100 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    }
  • trunk/wp-admin/options-general.php

    r1074 r1108  
    1414
    1515if (!get_magic_quotes_gpc()) {
    16     $HTTP_GET_VARS    = add_magic_quotes($HTTP_GET_VARS);
    17     $HTTP_POST_VARS   = add_magic_quotes($HTTP_POST_VARS);
    18     $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
     16    $_GET    = add_magic_quotes($_GET);
     17    $_POST   = add_magic_quotes($_POST);
     18    $_COOKIE = add_magic_quotes($_COOKIE);
    1919}
    2020
     
    2323    $wpvar = $wpvarstoreset[$i];
    2424    if (!isset($$wpvar)) {
    25         if (empty($HTTP_POST_VARS["$wpvar"])) {
    26             if (empty($HTTP_GET_VARS["$wpvar"])) {
     25        if (empty($_POST["$wpvar"])) {
     26            if (empty($_GET["$wpvar"])) {
    2727                $$wpvar = '';
    2828            } else {
    29                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     29                $$wpvar = $_GET["$wpvar"];
    3030            }
    3131        } else {
    32             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     32            $$wpvar = $_POST["$wpvar"];
    3333        }
    3434    }
  • trunk/wp-admin/options-misc.php

    r1100 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    }
  • trunk/wp-admin/options-permalink.php

    r1100 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    }
     
    3838require_once('optionhandler.php');
    3939
    40 if ($HTTP_POST_VARS['Submit'] == 'Update') {
    41     update_option('permalink_structure', $HTTP_POST_VARS['permalink_structure']);
    42     $permalink_structure = $HTTP_POST_VARS['permalink_structure'];
     40if ($_POST['Submit'] == 'Update') {
     41    update_option('permalink_structure', $_POST['permalink_structure']);
     42    $permalink_structure = $_POST['permalink_structure'];
    4343} else {
    4444    $permalink_structure = get_settings('permalink_structure');
  • trunk/wp-admin/options-reading.php

    r1100 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    }
  • trunk/wp-admin/options-writing.php

    r1100 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    }
  • trunk/wp-admin/options.php

    r1100 r1108  
    1616
    1717if (!get_magic_quotes_gpc()) {
    18     $HTTP_GET_VARS    = add_magic_quotes($HTTP_GET_VARS);
    19     $HTTP_POST_VARS   = add_magic_quotes($HTTP_POST_VARS);
    20     $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
     18    $_GET    = add_magic_quotes($_GET);
     19    $_POST   = add_magic_quotes($_POST);
     20    $_COOKIE = add_magic_quotes($_COOKIE);
    2121}
    2222
     
    2525    $wpvar = $wpvarstoreset[$i];
    2626    if (!isset($$wpvar)) {
    27         if (empty($HTTP_POST_VARS["$wpvar"])) {
    28             if (empty($HTTP_GET_VARS["$wpvar"])) {
     27        if (empty($_POST["$wpvar"])) {
     28            if (empty($_GET["$wpvar"])) {
    2929                $$wpvar = '';
    3030            } else {
    31                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     31                $$wpvar = $_GET["$wpvar"];
    3232            }
    3333        } else {
    34             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     34            $$wpvar = $_POST["$wpvar"];
    3535        }
    3636    }
  • trunk/wp-admin/post.php

    r1106 r1108  
    1616
    1717if (!get_magic_quotes_gpc()) {
    18     $HTTP_GET_VARS    = add_magic_quotes($HTTP_GET_VARS);
    19     $HTTP_POST_VARS   = add_magic_quotes($HTTP_POST_VARS);
    20     $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
     18    $_GET    = add_magic_quotes($_GET);
     19    $_POST   = add_magic_quotes($_POST);
     20    $_COOKIE = add_magic_quotes($_COOKIE);
    2121}
    2222
     
    2626    $wpvar = $wpvarstoreset[$i];
    2727    if (!isset($$wpvar)) {
    28         if (empty($HTTP_POST_VARS["$wpvar"])) {
    29             if (empty($HTTP_GET_VARS["$wpvar"])) {
     28        if (empty($_POST["$wpvar"])) {
     29            if (empty($_GET["$wpvar"])) {
    3030                $$wpvar = '';
    3131            } else {
    32                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     32                $$wpvar = $_GET["$wpvar"];
    3333            }
    3434        } else {
    35             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     35            $$wpvar = $_POST["$wpvar"];
    3636        }
    3737    }
     
    5959            require_once('admin-header.php');
    6060
    61             $post_pingback = intval($HTTP_POST_VARS['post_pingback']);
    62             $content = balanceTags($HTTP_POST_VARS['content']);
     61            $post_pingback = intval($_POST['post_pingback']);
     62            $content = balanceTags($_POST['content']);
    6363            $content = format_to_post($content);
    64             $excerpt = balanceTags($HTTP_POST_VARS['excerpt']);
     64            $excerpt = balanceTags($_POST['excerpt']);
    6565            $excerpt = format_to_post($excerpt);
    66             $post_title = addslashes($HTTP_POST_VARS['post_title']);
    67             $post_categories = $HTTP_POST_VARS['post_category'];
     66            $post_title = addslashes($_POST['post_title']);
     67            $post_categories = $_POST['post_category'];
    6868            if(get_settings('use_geo_positions')) {
    69                 $latstr = $HTTP_POST_VARS['post_latf'];
    70                 $lonstr = $HTTP_POST_VARS['post_lonf'];
     69                $latstr = $_POST['post_latf'];
     70                $lonstr = $_POST['post_lonf'];
    7171                if((strlen($latstr) > 2) && (strlen($lonstr) > 2 ) ) {
    72                     $post_latf = floatval($HTTP_POST_VARS['post_latf']);
    73                     $post_lonf = floatval($HTTP_POST_VARS['post_lonf']);
     72                    $post_latf = floatval($_POST['post_latf']);
     73                    $post_lonf = floatval($_POST['post_lonf']);
    7474                }
    7575            }
    76             $post_status = $HTTP_POST_VARS['post_status'];
     76            $post_status = $_POST['post_status'];
    7777            if (empty($post_status)) $post_status = get_settings('default_post_status');
    78             $comment_status = $HTTP_POST_VARS['comment_status'];
     78            $comment_status = $_POST['comment_status'];
    7979            if (empty($comment_status)) $comment_status = get_settings('default_comment_status');
    80             $ping_status = $HTTP_POST_VARS['ping_status'];
     80            $ping_status = $_POST['ping_status'];
    8181            if (empty($ping_status)) $ping_status = get_settings('default_ping_status');
    82             $post_password = addslashes(stripslashes($HTTP_POST_VARS['post_password']));
     82            $post_password = addslashes(stripslashes($_POST['post_password']));
    8383            $post_name = sanitize_title($post_title);
    84             $trackback = $HTTP_POST_VARS['trackback_url'];
     84            $trackback = $_POST['trackback_url'];
    8585        // Format trackbacks
    8686        $trackback = preg_replace('|\s+|', '\n', $trackback);
     
    8989            die (__('Cheatin&#8217; uh?'));
    9090
    91         if (($user_level > 4) && (!empty($HTTP_POST_VARS['edit_date']))) {
    92             $aa = $HTTP_POST_VARS['aa'];
    93             $mm = $HTTP_POST_VARS['mm'];
    94             $jj = $HTTP_POST_VARS['jj'];
    95             $hh = $HTTP_POST_VARS['hh'];
    96             $mn = $HTTP_POST_VARS['mn'];
    97             $ss = $HTTP_POST_VARS['ss'];
     91        if (($user_level > 4) && (!empty($_POST['edit_date']))) {
     92            $aa = $_POST['aa'];
     93            $mm = $_POST['mm'];
     94            $jj = $_POST['jj'];
     95            $hh = $_POST['hh'];
     96            $mn = $_POST['mn'];
     97            $ss = $_POST['ss'];
    9898            $jj = ($jj > 31) ? 31 : $jj;
    9999            $hh = ($hh > 23) ? $hh - 24 : $hh;
     
    107107        }
    108108
    109         if (!empty($HTTP_POST_VARS['mode'])) {
    110         switch($HTTP_POST_VARS['mode']) {
     109        if (!empty($_POST['mode'])) {
     110        switch($_POST['mode']) {
    111111            case 'bookmarklet':
    112112                $location = 'bookmarklet.php?a=b';
     
    124124
    125125        // What to do based on which button they pressed
    126         if ('' != $HTTP_POST_VARS['saveasdraft']) $post_status = 'draft';
    127         if ('' != $HTTP_POST_VARS['saveasprivate']) $post_status = 'private';
    128         if ('' != $HTTP_POST_VARS['publish']) $post_status = 'publish';
    129         if ('' != $HTTP_POST_VARS['advanced']) $post_status = 'draft';
     126        if ('' != $_POST['saveasdraft']) $post_status = 'draft';
     127        if ('' != $_POST['saveasprivate']) $post_status = 'private';
     128        if ('' != $_POST['publish']) $post_status = 'publish';
     129        if ('' != $_POST['advanced']) $post_status = 'draft';
    130130
    131131
     
    148148        $post_ID = $wpdb->get_var("SELECT ID FROM $tableposts ORDER BY ID DESC LIMIT 1");
    149149
    150         if ('' != $HTTP_POST_VARS['advanced'])
     150        if ('' != $_POST['advanced'])
    151151            $location = "post.php?action=edit&post=$post_ID";
    152152
     
    220220        require_once('admin-header.php');
    221221
    222         $post = $HTTP_GET_VARS['post'];
     222        $post = $_GET['post'];
    223223        if ($user_level > 0) {
    224224            $postdata = get_postdata($post);
     
    278278            $blog_ID = 1;
    279279        }
    280             $post_ID = $HTTP_POST_VARS['post_ID'];
    281             $post_categories = $HTTP_POST_VARS['post_category'];
     280            $post_ID = $_POST['post_ID'];
     281            $post_categories = $_POST['post_category'];
    282282            if (!$post_categories) $post_categories[] = 1;
    283             $post_autobr = intval($HTTP_POST_VARS['post_autobr']);
    284             $content = balanceTags($HTTP_POST_VARS['content']);
     283            $post_autobr = intval($_POST['post_autobr']);
     284            $content = balanceTags($_POST['content']);
    285285            $content = format_to_post($content);
    286             $excerpt = balanceTags($HTTP_POST_VARS['excerpt']);
     286            $excerpt = balanceTags($_POST['excerpt']);
    287287            $excerpt = format_to_post($excerpt);
    288             $post_title = addslashes($HTTP_POST_VARS['post_title']);
     288            $post_title = addslashes($_POST['post_title']);
    289289            if(get_settings('use_geo_positions')) {
    290                 $latf = floatval($HTTP_POST_VARS["post_latf"]);
    291                     $lonf = floatval($HTTP_POST_VARS["post_lonf"]);
     290                $latf = floatval($_POST["post_latf"]);
     291                    $lonf = floatval($_POST["post_lonf"]);
    292292                    $latlonaddition = "";
    293293                    if( ($latf != null) && ($latf <= 90 ) && ($latf >= -90) && ($lonf != null) && ($lonf <= 360) && ($lonf >= -360) ) {
     
    298298                }
    299299            }
    300             $prev_status = $HTTP_POST_VARS['prev_status'];
    301             $post_status = $HTTP_POST_VARS['post_status'];
    302             $comment_status = $HTTP_POST_VARS['comment_status'];
     300            $prev_status = $_POST['prev_status'];
     301            $post_status = $_POST['post_status'];
     302            $comment_status = $_POST['comment_status'];
    303303            if (empty($comment_status)) $comment_status = get_settings('default_comment_status');
    304             $ping_status = $HTTP_POST_VARS['ping_status'];
     304            $ping_status = $_POST['ping_status'];
    305305            if (empty($ping_status)) $ping_status = get_settings('default_ping_status');
    306             $post_password = addslashes($HTTP_POST_VARS['post_password']);
     306            $post_password = addslashes($_POST['post_password']);
    307307            $post_name = sanitize_title($_POST['post_name']);
    308308            if (empty($post_name)) $post_name = sanitize_title($post_title);
    309             $trackback = $HTTP_POST_VARS['trackback_url'];
     309            $trackback = $_POST['trackback_url'];
    310310        // Format trackbacks
    311311        $trackback = preg_replace('|\s+|', '\n', $trackback);
    312312       
    313         if ('' != $HTTP_POST_VARS['publish']) $post_status = 'publish';
    314 
    315         if (($user_level > 4) && (!empty($HTTP_POST_VARS['edit_date']))) {
    316             $aa = $HTTP_POST_VARS['aa'];
    317             $mm = $HTTP_POST_VARS['mm'];
    318             $jj = $HTTP_POST_VARS['jj'];
    319             $hh = $HTTP_POST_VARS['hh'];
    320             $mn = $HTTP_POST_VARS['mn'];
    321             $ss = $HTTP_POST_VARS['ss'];
     313        if ('' != $_POST['publish']) $post_status = 'publish';
     314
     315        if (($user_level > 4) && (!empty($_POST['edit_date']))) {
     316            $aa = $_POST['aa'];
     317            $mm = $_POST['mm'];
     318            $jj = $_POST['jj'];
     319            $hh = $_POST['hh'];
     320            $mn = $_POST['mn'];
     321            $ss = $_POST['ss'];
    322322            $jj = ($jj > 31) ? 31 : $jj;
    323323            $hh = ($hh > 23) ? $hh - 24 : $hh;
     
    400400        add_meta($post_ID);
    401401
    402         if ($HTTP_POST_VARS['save']) {
    403             $location = $HTTP_SERVER_VARS['HTTP_REFERER'];
     402        if ($_POST['save']) {
     403            $location = $_SERVER['HTTP_REFERER'];
    404404        } else {
    405405            $location = 'post.php';
     
    417417            die ('Cheatin&#8217; uh?');
    418418
    419         $post_id = intval($HTTP_GET_VARS['post']);
     419        $post_id = intval($_GET['post']);
    420420        $postdata = get_postdata($post_id) or die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'post.php'));
    421421        $authordata = get_userdata($postdata['Author_ID']);
     
    445445        }
    446446
    447         $sendback = $HTTP_SERVER_VARS['HTTP_REFERER'];
     447        $sendback = $_SERVER['HTTP_REFERER'];
    448448        if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post.php';
    449449        header ('Location: ' . $sendback);
     
    463463        }
    464464
    465         $comment = $HTTP_GET_VARS['comment'];
     465        $comment = $_GET['comment'];
    466466        $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'javascript:history.go(-1)'));
    467467        $content = $commentdata['comment_content'];
     
    480480        die (__('Cheatin&#8217; uh?'));
    481481   
    482     $comment = $HTTP_GET_VARS['comment'];
    483     $p = $HTTP_GET_VARS['p'];
     482    $comment = $_GET['comment'];
     483    $p = $_GET['p'];
    484484    $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    485485   
     
    516516
    517517
    518     $comment = $HTTP_GET_VARS['comment'];
    519     $p = $HTTP_GET_VARS['p'];
    520     if (isset($HTTP_GET_VARS['noredir'])) {
     518    $comment = $_GET['comment'];
     519    $p = $_GET['p'];
     520    if (isset($_GET['noredir'])) {
    521521        $noredir = true;
    522522    } else {
     
    534534    do_action('delete_comment', $comment);
    535535
    536     if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
    537         header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
     536    if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
     537        header('Location: ' . $_SERVER['HTTP_REFERER']);
    538538    } else {
    539539        header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
     
    550550        die (__('Cheatin&#8217; uh?'));
    551551       
    552     $comment = $HTTP_GET_VARS['comment'];
    553     $p = $HTTP_GET_VARS['p'];
    554     if (isset($HTTP_GET_VARS['noredir'])) {
     552    $comment = $_GET['comment'];
     553    $p = $_GET['p'];
     554    if (isset($_GET['noredir'])) {
    555555        $noredir = true;
    556556    } else {
     
    562562    wp_set_comment_status($comment, "hold");
    563563   
    564     if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
    565         header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
     564    if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
     565        header('Location: ' . $_SERVER['HTTP_REFERER']);
    566566    } else {
    567567        header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
     
    578578        die (__('Cheatin&#8217; uh?'));
    579579   
    580     $comment = $HTTP_GET_VARS['comment'];
    581     $p = $HTTP_GET_VARS['p'];
     580    $comment = $_GET['comment'];
     581    $p = $_GET['p'];
    582582    $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    583583
     
    607607        die (__('Cheatin&#8217; uh?'));
    608608       
    609     $comment = $HTTP_GET_VARS['comment'];
    610     $p = $HTTP_GET_VARS['p'];
    611     if (isset($HTTP_GET_VARS['noredir'])) {
     609    $comment = $_GET['comment'];
     610    $p = $_GET['p'];
     611    if (isset($_GET['noredir'])) {
    612612        $noredir = true;
    613613    } else {
     
    622622   
    623623     
    624     if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
    625         header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
     624    if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
     625        header('Location: ' . $_SERVER['HTTP_REFERER']);
    626626    } else {
    627627        header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
     
    638638            die (__('Cheatin&#8217; uh?'));
    639639
    640         $comment_ID = $HTTP_POST_VARS['comment_ID'];
    641         $comment_post_ID = $HTTP_POST_VARS['comment_post_ID'];
    642         $newcomment_author = $HTTP_POST_VARS['newcomment_author'];
    643         $newcomment_author_email = $HTTP_POST_VARS['newcomment_author_email'];
    644         $newcomment_author_url = $HTTP_POST_VARS['newcomment_author_url'];
     640        $comment_ID = $_POST['comment_ID'];
     641        $comment_post_ID = $_POST['comment_post_ID'];
     642        $newcomment_author = $_POST['newcomment_author'];
     643        $newcomment_author_email = $_POST['newcomment_author_email'];
     644        $newcomment_author_url = $_POST['newcomment_author_url'];
    645645        $newcomment_author = addslashes($newcomment_author);
    646646        $newcomment_author_email = addslashes($newcomment_author_email);
    647647        $newcomment_author_url = addslashes($newcomment_author_url);
    648648
    649         if (($user_level > 4) && (!empty($HTTP_POST_VARS['edit_date']))) {
    650             $aa = $HTTP_POST_VARS['aa'];
    651             $mm = $HTTP_POST_VARS['mm'];
    652             $jj = $HTTP_POST_VARS['jj'];
    653             $hh = $HTTP_POST_VARS['hh'];
    654             $mn = $HTTP_POST_VARS['mn'];
    655             $ss = $HTTP_POST_VARS['ss'];
     649        if (($user_level > 4) && (!empty($_POST['edit_date']))) {
     650            $aa = $_POST['aa'];
     651            $mm = $_POST['mm'];
     652            $jj = $_POST['jj'];
     653            $hh = $_POST['hh'];
     654            $mn = $_POST['mn'];
     655            $ss = $_POST['ss'];
    656656            $jj = ($jj > 31) ? 31 : $jj;
    657657            $hh = ($hh > 23) ? $hh - 24 : $hh;
     
    674674            );
    675675
    676         $referredby = $HTTP_POST_VARS['referredby'];
     676        $referredby = $_POST['referredby'];
    677677        if (!empty($referredby)) header('Location: ' . $referredby);
    678678        else header ("Location: edit.php?p=$comment_post_ID&c=1#comments");
  • trunk/wp-admin/profile.php

    r1100 r1108  
    1414
    1515if (!get_magic_quotes_gpc()) {
    16     $HTTP_GET_VARS    = add_magic_quotes($HTTP_GET_VARS);
    17     $HTTP_POST_VARS   = add_magic_quotes($HTTP_POST_VARS);
    18     $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
     16    $_GET    = add_magic_quotes($_GET);
     17    $_POST   = add_magic_quotes($_POST);
     18    $_COOKIE = add_magic_quotes($_COOKIE);
    1919}
    2020
     
    2323    $wpvar = $wpvarstoreset[$i];
    2424    if (!isset($$wpvar)) {
    25         if (empty($HTTP_POST_VARS["$wpvar"])) {
    26             if (empty($HTTP_GET_VARS["$wpvar"])) {
     25        if (empty($_POST["$wpvar"])) {
     26            if (empty($_GET["$wpvar"])) {
    2727                $$wpvar = '';
    2828            } else {
    29                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     29                $$wpvar = $_GET["$wpvar"];
    3030            }
    3131        } else {
    32             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     32            $$wpvar = $_POST["$wpvar"];
    3333        }
    3434    }
     
    4444
    4545    /* checking the nickname has been typed */
    46     if (empty($HTTP_POST_VARS["newuser_nickname"])) {
     46    if (empty($_POST["newuser_nickname"])) {
    4747        die ("<strong>ERROR</strong>: please enter your nickname (can be the same as your login)");
    4848        return false;
     
    5050
    5151    /* if the ICQ UIN has been entered, check to see if it has only numbers */
    52     if (!empty($HTTP_POST_VARS["newuser_icq"])) {
    53         if ((ereg("^[0-9]+$",$HTTP_POST_VARS["newuser_icq"]))==false) {
     52    if (!empty($_POST["newuser_icq"])) {
     53        if ((ereg("^[0-9]+$",$_POST["newuser_icq"]))==false) {
    5454            die ("<strong>ERROR</strong>: your ICQ UIN can only be a number, no letters allowed");
    5555            return false;
     
    5858
    5959    /* checking e-mail address */
    60     if (empty($HTTP_POST_VARS["newuser_email"])) {
     60    if (empty($_POST["newuser_email"])) {
    6161        die ("<strong>ERROR</strong>: please type your e-mail address");
    6262        return false;
    63     } else if (!is_email($HTTP_POST_VARS["newuser_email"])) {
     63    } else if (!is_email($_POST["newuser_email"])) {
    6464        die ("<strong>ERROR</strong>: the email address isn't correct");
    6565        return false;
    6666    }
    6767
    68     if ($HTTP_POST_VARS["pass1"] == "") {
    69         if ($HTTP_POST_VARS["pass2"] != "")
     68    if ($_POST["pass1"] == "") {
     69        if ($_POST["pass2"] != "")
    7070            die ("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.");
    7171        $updatepassword = "";
    7272    } else {
    73         if ($HTTP_POST_VARS["pass2"] == "")
     73        if ($_POST["pass2"] == "")
    7474            die ("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.");
    75         if ($HTTP_POST_VARS["pass1"] != $HTTP_POST_VARS["pass2"])
     75        if ($_POST["pass1"] != $_POST["pass2"])
    7676            die ("<strong>ERROR</strong>: you typed two different passwords. Go back to correct that.");
    77         $newuser_pass = $HTTP_POST_VARS["pass1"];
     77        $newuser_pass = $_POST["pass1"];
    7878        $updatepassword = "user_pass=MD5('$newuser_pass'), ";
    7979        setcookie("wordpresspass_".$cookiehash,md5($newuser_pass),time()+31536000);
    8080    }
    8181
    82     $newuser_firstname=addslashes(stripslashes($HTTP_POST_VARS['newuser_firstname']));
    83     $newuser_lastname=addslashes(stripslashes($HTTP_POST_VARS['newuser_lastname']));
    84     $newuser_nickname=addslashes(stripslashes($HTTP_POST_VARS['newuser_nickname']));
    85     $newuser_icq=addslashes(stripslashes($HTTP_POST_VARS['newuser_icq']));
    86     $newuser_aim=addslashes(stripslashes($HTTP_POST_VARS['newuser_aim']));
    87     $newuser_msn=addslashes(stripslashes($HTTP_POST_VARS['newuser_msn']));
    88     $newuser_yim=addslashes(stripslashes($HTTP_POST_VARS['newuser_yim']));
    89     $newuser_email=addslashes(stripslashes($HTTP_POST_VARS['newuser_email']));
    90     $newuser_url=addslashes(stripslashes($HTTP_POST_VARS['newuser_url']));
    91     $newuser_idmode=addslashes(stripslashes($HTTP_POST_VARS['newuser_idmode']));
    92     $user_description = addslashes(stripslashes($HTTP_POST_VARS['user_description']));
     82    $newuser_firstname=addslashes(stripslashes($_POST['newuser_firstname']));
     83    $newuser_lastname=addslashes(stripslashes($_POST['newuser_lastname']));
     84    $newuser_nickname=addslashes(stripslashes($_POST['newuser_nickname']));
     85    $newuser_icq=addslashes(stripslashes($_POST['newuser_icq']));
     86    $newuser_aim=addslashes(stripslashes($_POST['newuser_aim']));
     87    $newuser_msn=addslashes(stripslashes($_POST['newuser_msn']));
     88    $newuser_yim=addslashes(stripslashes($_POST['newuser_yim']));
     89    $newuser_email=addslashes(stripslashes($_POST['newuser_email']));
     90    $newuser_url=addslashes(stripslashes($_POST['newuser_url']));
     91    $newuser_idmode=addslashes(stripslashes($_POST['newuser_idmode']));
     92    $user_description = addslashes(stripslashes($_POST['user_description']));
    9393
    9494    $query = "UPDATE $tableusers SET user_firstname='$newuser_firstname', $updatepassword user_lastname='$newuser_lastname', user_nickname='$newuser_nickname', user_icq='$newuser_icq', user_email='$newuser_email', user_url='$newuser_url', user_aim='$newuser_aim', user_msn='$newuser_msn', user_yim='$newuser_yim', user_idmode='$newuser_idmode', user_description = '$user_description' WHERE ID = $user_ID";
     
    104104
    105105    $profiledata = get_userdata($user);
    106     if ($HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash] == $profiledata->user_login)
     106    if ($_COOKIE['wordpressuser_'.$cookiehash] == $profiledata->user_login)
    107107        header ('Location: profile.php');
    108108   
  • trunk/wp-admin/sidebar.php

    r879 r1108  
    1212$time_difference = get_settings('time_difference');
    1313
    14 if ('b' == $HTTP_GET_VARS['a']) {
     14if ('b' == $_GET['a']) {
    1515
    1616?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  • trunk/wp-admin/templates.php

    r1100 r1108  
    3030
    3131if (!get_magic_quotes_gpc()) {
    32     $HTTP_GET_VARS    = add_magic_quotes($HTTP_GET_VARS);
    33     $HTTP_POST_VARS   = add_magic_quotes($HTTP_POST_VARS);
    34     $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
     32    $_GET    = add_magic_quotes($_GET);
     33    $_POST   = add_magic_quotes($_POST);
     34    $_COOKIE = add_magic_quotes($_COOKIE);
    3535}
    3636
     
    3939    $wpvar = $wpvarstoreset[$i];
    4040    if (!isset($$wpvar)) {
    41         if (empty($HTTP_POST_VARS["$wpvar"])) {
    42             if (empty($HTTP_GET_VARS["$wpvar"])) {
     41        if (empty($_POST["$wpvar"])) {
     42            if (empty($_GET["$wpvar"])) {
    4343                $$wpvar = '';
    4444            } else {
    45                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     45                $$wpvar = $_GET["$wpvar"];
    4646            }
    4747        } else {
    48             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     48            $$wpvar = $_POST["$wpvar"];
    4949        }
    5050    }
     
    6262    }
    6363
    64     $newcontent = stripslashes($HTTP_POST_VARS['newcontent']);
    65     $file = $HTTP_POST_VARS['file'];
     64    $newcontent = stripslashes($_POST['newcontent']);
     65    $file = $_POST['file'];
    6666    $file = validate_file($file);
    6767    $real_file = '../' . $file;
  • trunk/wp-admin/upgrade.php

    r1069 r1108  
    55require('upgrade-functions.php');
    66
    7 $step = $HTTP_GET_VARS['step'];
     7$step = $_GET['step'];
    88if (!$step) $step = 0;
    99?>
  • trunk/wp-admin/upload.php

    r1091 r1108  
    1212$allowed_types = explode(' ', trim(strtolower(get_settings('fileupload_allowedtypes'))));
    1313
    14 if ($HTTP_POST_VARS['submit']) {
     14if ($_POST['submit']) {
    1515    $action = 'upload';
    1616} else {
     
    8383
    8484
    85     $imgalt = (isset($HTTP_POST_VARS['imgalt'])) ? $HTTP_POST_VARS['imgalt'] : $imgalt;
    86 
    87     $img1_name = (strlen($imgalt)) ? $HTTP_POST_VARS['imgalt'] : $HTTP_POST_FILES['img1']['name'];
    88     $img1_type = (strlen($imgalt)) ? $HTTP_POST_VARS['img1_type'] : $HTTP_POST_FILES['img1']['type'];
    89     $imgdesc = str_replace('"', '&amp;quot;', $HTTP_POST_VARS['imgdesc']);
     85    $imgalt = (isset($_POST['imgalt'])) ? $_POST['imgalt'] : $imgalt;
     86
     87    $img1_name = (strlen($imgalt)) ? $_POST['imgalt'] : $HTTP_POST_FILES['img1']['name'];
     88    $img1_type = (strlen($imgalt)) ? $_POST['img1_type'] : $HTTP_POST_FILES['img1']['type'];
     89    $imgdesc = str_replace('"', '&amp;quot;', $_POST['imgdesc']);
    9090
    9191    $imgtype = explode(".",$img1_name);
     
    9898    if (strlen($imgalt)) {
    9999        $pathtofile = get_settings('fileupload_realpath')."/".$imgalt;
    100         $img1 = $HTTP_POST_VARS['img1'];
     100        $img1 = $_POST['img1'];
    101101    } else {
    102102        $pathtofile = get_settings('fileupload_realpath')."/".$img1_name;
     
    182182    }
    183183   
    184     if($HTTP_POST_VARS['thumbsize'] != 'none' ) {
    185         if($HTTP_POST_VARS['thumbsize'] == 'small') {
     184    if($_POST['thumbsize'] != 'none' ) {
     185        if($_POST['thumbsize'] == 'small') {
    186186            $max_side = 200;
    187187        }
    188         elseif($HTTP_POST_VARS['thumbsize'] == 'large') {
     188        elseif($_POST['thumbsize'] == 'large') {
    189189            $max_side = 400;
    190190        }
    191         elseif($HTTP_POST_VARS['thumbsize'] == 'custom') {
    192             $max_side = $HTTP_POST_VARS['imgthumbsizecustom'];
     191        elseif($_POST['thumbsize'] == 'custom') {
     192            $max_side = $_POST['imgthumbsizecustom'];
    193193        }
    194194       
  • trunk/wp-admin/users.php

    r1070 r1108  
    77    $wpvar = $wpvarstoreset[$i];
    88    if (!isset($$wpvar)) {
    9         if (empty($HTTP_POST_VARS["$wpvar"])) {
    10             if (empty($HTTP_GET_VARS["$wpvar"])) {
     9        if (empty($_POST["$wpvar"])) {
     10            if (empty($_GET["$wpvar"])) {
    1111                $$wpvar = '';
    1212            } else {
    13                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     13                $$wpvar = $_GET["$wpvar"];
    1414            }
    1515        } else {
    16             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     16            $$wpvar = $_POST["$wpvar"];
    1717        }
    1818    }
     
    2727    }
    2828
    29     $user_login = $HTTP_POST_VARS['user_login'];
    30     $pass1 = $HTTP_POST_VARS['pass1'];
    31     $pass2 = $HTTP_POST_VARS['pass2'];
    32     $user_email = $HTTP_POST_VARS['email'];
    33     $user_firstname = $HTTP_POST_VARS['firstname'];
    34     $user_lastname = $HTTP_POST_VARS['lastname'];
     29    $user_login = $_POST['user_login'];
     30    $pass1 = $_POST['pass1'];
     31    $pass2 = $_POST['pass2'];
     32    $user_email = $_POST['email'];
     33    $user_firstname = $_POST['firstname'];
     34    $user_lastname = $_POST['lastname'];
    3535       
    3636    /* checking login has been typed */
     
    9999    require_once('admin-header.php');
    100100
    101     if (empty($HTTP_GET_VARS['prom'])) {
     101    if (empty($_GET['prom'])) {
    102102        header('Location: users.php');
    103103    }
    104104
    105     $id = $HTTP_GET_VARS['id'];
    106     $prom = $HTTP_GET_VARS['prom'];
     105    $id = $_GET['id'];
     106    $prom = $_GET['prom'];
    107107
    108108    $user_data = get_userdata($id);
     
    131131    require_once('admin-header.php');
    132132
    133     $id = intval($HTTP_GET_VARS['id']);
     133    $id = intval($_GET['id']);
    134134
    135135    if (!$id) {
  • trunk/wp-blog-header.php

    r1047 r1108  
    11<?php
    2 
    3 $use_cache = 1; // No reason not to
    42
    53/* Including config and functions files */
     
    2321    if (! empty($rewrite)) {
    2422        // Get the name of the file requesting path info.
    25         $req_uri = $HTTP_SERVER_VARS['REQUEST_URI'];
     23        $req_uri = $_SERVER['REQUEST_URI'];
    2624        $req_uri = str_replace($pathinfo, '', $req_uri);
    2725        $req_uri = preg_replace("!/+$!", '', $req_uri);
     
    5856        $wpvar = $wpvarstoreset[$i];
    5957        if (!isset($$wpvar)) {
    60             if (empty($HTTP_POST_VARS[$wpvar])) {
    61                 if (empty($HTTP_GET_VARS[$wpvar]) && empty($path_info[$wpvar])) {
     58            if (empty($_POST[$wpvar])) {
     59                if (empty($_GET[$wpvar]) && empty($path_info[$wpvar])) {
    6260                    $$wpvar = '';
    63                 } elseif (!empty($HTTP_GET_VARS[$wpvar])) {
    64                     $$wpvar = $HTTP_GET_VARS[$wpvar];
     61                } elseif (!empty($_GET[$wpvar])) {
     62                    $$wpvar = $_GET[$wpvar];
    6563                } else {
    6664                    $$wpvar = $path_info[$wpvar];
    6765                }
    6866            } else {
    69                 $$wpvar = $HTTP_POST_VARS[$wpvar];
     67                $$wpvar = $_POST[$wpvar];
    7068            }
    7169        }
  • trunk/wp-comments-popup.php

    r1080 r1108  
    3232<?php
    3333// this line is WordPress' motor, do not delete it.
    34 $comment_author = (isset($HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_'.$cookiehash]) : '';
    35 $comment_author_email = (isset($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash]) : '';
    36 $comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) : '';
     34$comment_author = (isset($_COOKIE['comment_author_'.$cookiehash])) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
     35$comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
     36$comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
    3737$comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
    3838$commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $tableposts WHERE ID = $id");
    39 if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $commentstatus->post_password) {  // and it doesn't match the cookie
     39if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'.$cookiehash] != $commentstatus->post_password) {  // and it doesn't match the cookie
    4040    echo(get_the_password_form());
    4141} else { ?>
  • trunk/wp-comments-post.php

    r1018 r1108  
    1414
    1515if (!get_magic_quotes_gpc()) {
    16     $HTTP_GET_VARS    = add_magic_quotes($HTTP_GET_VARS);
    17     $HTTP_POST_VARS   = add_magic_quotes($HTTP_POST_VARS);
    18     $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
     16    $_GET    = add_magic_quotes($_GET);
     17    $_POST   = add_magic_quotes($_POST);
     18    $_COOKIE = add_magic_quotes($_COOKIE);
    1919}
    2020
    21 $author = trim(strip_tags($HTTP_POST_VARS['author']));
     21$author = trim(strip_tags($_POST['author']));
    2222
    23 $email = trim(strip_tags($HTTP_POST_VARS['email']));
     23$email = trim(strip_tags($_POST['email']));
    2424if (strlen($email) < 6)
    2525    $email = '';
    2626
    27 $url = trim(strip_tags($HTTP_POST_VARS['url']));
     27$url = trim(strip_tags($_POST['url']));
    2828$url = ((!stristr($url, '://')) && ($url != '')) ? 'http://'.$url : $url;
    2929if (strlen($url) < 7)
    3030    $url = '';
    3131
    32 $comment = trim($HTTP_POST_VARS['comment']);
     32$comment = trim($_POST['comment']);
    3333$original_comment = $comment;
    34 $comment_post_ID = intval($HTTP_POST_VARS['comment_post_ID']);
    35 $user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
     34$comment_post_ID = intval($_POST['comment_post_ID']);
     35$user_ip = $_SERVER['REMOTE_ADDR'];
    3636$user_domain = gethostbyaddr($user_ip);
    3737
     
    117117    header('Cache-Control: no-cache, must-revalidate');
    118118    header('Pragma: no-cache');
    119     $location = (empty($HTTP_POST_VARS['redirect_to'])) ? $HTTP_SERVER_VARS["HTTP_REFERER"] : $HTTP_POST_VARS['redirect_to'];
     119    $location = (empty($_POST['redirect_to'])) ? $_SERVER["HTTP_REFERER"] : $_POST['redirect_to'];
    120120    if ($is_IIS) {
    121121        header("Refresh: 0;url=$location");
  • trunk/wp-comments-reply.php

    r1055 r1108  
    2626
    2727        if (!empty($post->post_password)) { // if there's a password
    28             if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie
     28            if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie
    2929                echo("<p>Enter your password to view comments.<p>");
    3030                return;
     
    3232        }
    3333
    34         $comment_author = (isset($HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_'.$cookiehash]) : '';
    35         $comment_author_email = (isset($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash]) : '';
    36         $comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) : '';
     34        $comment_author = (isset($_COOKIE['comment_author_'.$cookiehash])) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
     35        $comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
     36        $comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
    3737        $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = '$id' AND comment_approved = '1' AND comment_ID = '$comment_reply_ID' ORDER BY comment_date");
    3838?>
  • trunk/wp-comments.php

    r1080 r1108  
    11<?php // Do not delete these lines
    2     if ('wp-comments.php' == basename($HTTP_SERVER_VARS['SCRIPT_FILENAME']))
     2    if ('wp-comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    33        die ('Please do not load this page directly. Thanks!');
    44    if (($withcomments) or ($single)) {
    55
    66        if (!empty($post->post_password)) { // if there's a password
    7             if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie
     7            if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie
    88?>
    99<p><?php e_("Enter your password to view comments."); ?><p>
     
    1313        }
    1414
    15         $comment_author = (isset($HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_'.$cookiehash]) : '';
    16         $comment_author_email = (isset($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash]) : '';
    17         $comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) : '';
     15        $comment_author = (isset($_COOKIE['comment_author_'.$cookiehash])) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
     16        $comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
     17        $comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
    1818
    1919        $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = '$id' AND comment_approved = '1' ORDER BY comment_date");
  • trunk/wp-commentsrss2.php

    r1105 r1108  
    5252        <guid isPermaLink="false"><?php comment_ID(); echo ":".$comment->comment_post_ID; ?>@<?php bloginfo_rss("url") ?></guid>
    5353            <?php
    54             if (!empty($comment->post_password) && $HTTP_COOKIE_VARS['wp-postpass'] != $comment->post_password) {
     54            if (!empty($comment->post_password) && $_COOKIE['wp-postpass'] != $comment->post_password) {
    5555            ?>
    5656        <description>Protected Comments: Please enter your password to view comments.</description>
  • trunk/wp-content/plugins/hello.php

    r1008 r1108  
    33Plugin Name: Hello Dolly
    44Plugin URI: http://wordpress.org/#
    5 Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. Hello, Dolly. This is, by the way, the world's first official WordPress plugin. Wish it did something useful.
     5Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. Hello, Dolly. This is, by the way, the world's first official WordPress plugin. When enabled you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen.
    66Author: Matt Mullenweg
    7 Author URI: http://photomatt.net
     7Author URI: http://photomatt.net/
    88*/
    99
  • trunk/wp-includes/functions.php

    r1084 r1108  
    9999
    100100function get_lastpostdate($timezone = 'server') {
    101     global $tableposts, $cache_lastpostdate, $use_cache, $pagenow, $wpdb;
     101    global $tableposts, $cache_lastpostdate, $pagenow, $wpdb;
    102102    $add_seconds_blog = get_settings('gmt_offset') * 3600;
    103103    $add_seconds_server = date('Z');
    104104    $now = current_time('mysql', 1);
    105     if ((!isset($cache_lastpostdate[$timezone])) OR (!$use_cache)) {
     105    if ( !isset($cache_lastpostdate[$timezone]) ) {
    106106        switch(strtolower($timezone)) {
    107107            case 'gmt':
     
    123123
    124124function get_lastpostmodified($timezone = 'server') {
    125     global $tableposts, $cache_lastpostmodified, $use_cache, $pagenow, $wpdb;
     125    global $tableposts, $cache_lastpostmodified, $pagenow, $wpdb;
    126126    $add_seconds_blog = get_settings('gmt_offset') * 3600;
    127127    $add_seconds_server = date('Z');
    128128    $now = current_time('mysql', 1);
    129     if ((!isset($cache_lastpostmodified[$timezone])) OR (!$use_cache)) {
     129    if ( !isset($cache_lastpostmodified[$timezone]) ) {
    130130        switch(strtolower($timezone)) {
    131131            case 'gmt':
     
    151151
    152152function user_pass_ok($user_login,$user_pass) {
    153     global $cache_userdata,$use_cache;
    154     if ((empty($cache_userdata[$user_login])) OR (!$use_cache)) {
     153    global $cache_userdata;
     154    if ( empty($cache_userdata[$user_login]) ) {
    155155        $userdata = get_userdatabylogin($user_login);
    156156    } else {
     
    174174
    175175function get_userdata($userid) {
    176     global $wpdb, $cache_userdata, $use_cache, $tableusers;
    177     if ((empty($cache_userdata[$userid])) || (!$use_cache)) {
     176    global $wpdb, $cache_userdata, $tableusers;
     177    if ( empty($cache_userdata[$userid]) ) {
    178178        $user = $wpdb->get_row("SELECT * FROM $tableusers WHERE ID = '$userid'");
    179179        $user->user_nickname = stripslashes($user->user_nickname);
     
    191191
    192192function get_userdatabylogin($user_login) {
    193     global $tableusers, $cache_userdata, $use_cache, $wpdb;
    194     if ((empty($cache_userdata["$user_login"])) OR (!$use_cache)) {
     193    global $tableusers, $cache_userdata, $wpdb;
     194    if ( empty($cache_userdata["$user_login"]) ) {
    195195        $user = $wpdb->get_row("SELECT * FROM $tableusers WHERE user_login = '$user_login'");
    196196        $cache_userdata["$user_login"] = $user;
     
    202202
    203203function get_userid($user_login) {
    204     global $tableusers, $cache_userdata, $use_cache, $wpdb;
    205     if ((empty($cache_userdata["$user_login"])) OR (!$use_cache)) {
     204    global $tableusers, $cache_userdata, $wpdb;
     205    if ( empty($cache_userdata["$user_login"]) ) {
    206206        $user_id = $wpdb->get_var("SELECT ID FROM $tableusers WHERE user_login = '$user_login'");
    207207
     
    294294
    295295function get_settings($setting) {
    296     global $wpdb, $cache_settings, $use_cache;
     296    global $wpdb, $cache_settings;
    297297    if (strstr($_SERVER['REQUEST_URI'], 'install.php')) {
    298298        return false;
     
    302302    $setting = str_replace('time_difference', 'gmt_offset', $setting);
    303303
    304     if ((empty($cache_settings)) OR (!$use_cache)) {
     304    if ( (empty($cache_settings)) ) {
    305305        $settings = get_alloptions();
    306306        $cache_settings = $settings;
     
    348348        $wpdb->query("INSERT INTO $tableoptions (option_name, option_value) VALUES ('$name', '$value')");
    349349
    350         global $use_cache;
    351         if($wpdb->insert_id && $use_cache) {
     350        if($wpdb->insert_id) {
    352351            global $cache_settings;
    353352            $cache_settings->{$name} = $value;
     
    413412
    414413function get_catname($cat_ID) {
    415     global $tablecategories,$cache_catnames,$use_cache, $wpdb;
    416     if ((!$cache_catnames) || (!$use_cache)) {
     414    global $tablecategories, $cache_catnames, $wpdb;
     415    if ( !$cache_catnames) ) {
    417416        $results = $wpdb->get_results("SELECT * FROM $tablecategories") or die('Oops, couldn\'t query the db for categories.');
    418417        foreach ($results as $post) {
     
    475474            }
    476475        } else if($phpver > "4.0") {
    477             if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) {
     476            if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
    478477                if(extension_loaded("zlib")) {
    479478                    $do_gzip_compress = TRUE;
     
    10031002
    10041003    if ('' == $comment->comment_author_email || '' == $comment->comment_author) {
    1005         $from = "From: \"$blogname\" <wordpress@" . $HTTP_SERVER_VARS['SERVER_NAME'] . '>';
     1004        $from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>';
    10061005    } else {
    10071006        $from = 'From: "' . stripslashes($comment->comment_author) . "\" <$comment->comment_author_email>";
     
    10621061    global $preview_userid,$preview_date,$preview_content,$preview_title,$preview_category,$preview_notify,$preview_make_clickable,$preview_autobr;
    10631062    global $pagenow;
    1064     global $HTTP_GET_VARS;
    10651063    if (!$preview) {
    10661064        $id = $post->ID;
     
    10691067        $postdata = array (
    10701068            'ID' => 0,
    1071             'Author_ID' => $HTTP_GET_VARS['preview_userid'],
    1072             'Date' => $HTTP_GET_VARS['preview_date'],
    1073             'Content' => $HTTP_GET_VARS['preview_content'],
    1074             'Excerpt' => $HTTP_GET_VARS['preview_excerpt'],
    1075             'Title' => $HTTP_GET_VARS['preview_title'],
    1076             'Category' => $HTTP_GET_VARS['preview_category'],
     1069            'Author_ID' => $_GET['preview_userid'],
     1070            'Date' => $_GET['preview_date'],
     1071            'Content' => $_GET['preview_content'],
     1072            'Excerpt' => $_GET['preview_excerpt'],
     1073            'Title' => $_GET['preview_title'],
     1074            'Category' => $_GET['preview_category'],
    10771075            'Notify' => 1
    10781076            );
  • trunk/wp-includes/template-functions-category.php

    r1088 r1108  
    113113
    114114function get_the_category_by_ID($cat_ID) {
    115     global $tablecategories, $cache_categories, $use_cache, $wpdb;
    116     if ((!$cache_categories[$cat_ID]) OR (!$use_cache)) {
     115    global $tablecategories, $cache_categories, $wpdb;
     116    if ( !$cache_categories[$cat_ID]) ) {
    117117        $cat_name = $wpdb->get_var("SELECT cat_name FROM $tablecategories WHERE cat_ID = '$cat_ID'");
    118118        $cache_categories[$cat_ID]->cat_name = $cat_name;
  • trunk/wp-includes/template-functions-comment.php

    r1024 r1108  
    6060
    6161function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') {
    62     global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash;
     62    global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $cookiehash;
    6363    global $querystring_start, $querystring_equal, $querystring_separator;
    6464    global $comment_count_cache, $single;
     
    7474    } else {
    7575        if (!empty($post->post_password)) { // if there's a password
    76             if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie
     76            if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie
    7777                echo('Enter your password to view comments');
    7878                return;
  • trunk/wp-includes/template-functions-general.php

    r996 r1108  
    309309
    310310function get_calendar($daylength = 1) {
    311     global $wpdb, $HTTP_GET_VARS, $m, $monthnum, $year, $timedifference, $month, $weekday, $tableposts, $posts;
     311    global $wpdb, $m, $monthnum, $year, $timedifference, $month, $weekday, $tableposts, $posts;
    312312
    313313    // Quick check. If we have no posts at all, abort!
     
    318318    }
    319319
    320     if (isset($HTTP_GET_VARS['w'])) {
    321         $w = ''.intval($HTTP_GET_VARS['w']);
     320    if (isset($_GET['w'])) {
     321        $w = ''.intval($_GET['w']);
    322322    }
    323323    $time_difference = get_settings('time_difference');
  • trunk/wp-includes/template-functions-post.php

    r1088 r1108  
    9999function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
    100100    global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages;
    101     global $HTTP_SERVER_VARS, $preview, $cookiehash;
     101    global $preview, $cookiehash;
    102102    global $pagenow;
    103103    $output = '';
     
    113113        $file = $more_file;
    114114    } else {
    115         $file = $pagenow; //$HTTP_SERVER_VARS['PHP_SELF'];
     115        $file = $pagenow; //$_SERVER['PHP_SELF'];
    116116    }
    117117    $content = $pages[$page-1];
     
    344344
    345345function next_posts($max_page = 0) { // original by cfactor at cooltux.org
    346     global $HTTP_SERVER_VARS, $p, $paged, $what_to_show, $pagenow;
     346    global $p, $paged, $what_to_show, $pagenow;
    347347    global $querystring_start, $querystring_equal, $querystring_separator;
    348348    if (empty($p) && ($what_to_show == 'paged')) {
    349         $qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
     349        $qstr = $_SERVER['QUERY_STRING'];
    350350        if (!empty($qstr)) {
    351351            $qstr = preg_replace('/&paged=\d{0,}/', '', $qstr);
    352352            $qstr = preg_replace('/paged=\d{0,}/', '', $qstr);
    353         } elseif (stristr($HTTP_SERVER_VARS['REQUEST_URI'], $HTTP_SERVER_VARS['SCRIPT_NAME'] )) {
    354             if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '',
    355                                             $HTTP_SERVER_VARS['REQUEST_URI']) ) {
     353        } elseif (stristr($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'] )) {
     354            if ('' != $qstr = str_replace($_SERVER['SCRIPT_NAME'], '',
     355                                            $_SERVER['REQUEST_URI']) ) {
    356356                $qstr = preg_replace('/^\//', '', $qstr);
    357357                $qstr = preg_replace('/paged\/\d{0,}\//', '', $qstr);
     
    397397
    398398function previous_posts() { // original by cfactor at cooltux.org
    399     global $HTTP_SERVER_VARS, $p, $paged, $what_to_show, $pagenow;
     399    global $_SERVER, $p, $paged, $what_to_show, $pagenow;
    400400    global $querystring_start, $querystring_equal, $querystring_separator;
    401401    if (empty($p) && ($what_to_show == 'paged')) {
    402         $qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
     402        $qstr = $_SERVER['QUERY_STRING'];
    403403        if (!empty($qstr)) {
    404404            $qstr = preg_replace('/&paged=\d{0,}/', '', $qstr);
    405405            $qstr = preg_replace('/paged=\d{0,}/', '', $qstr);
    406         } elseif (stristr($HTTP_SERVER_VARS['REQUEST_URI'], $HTTP_SERVER_VARS['SCRIPT_NAME'] )) {
    407             if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '',
    408                                             $HTTP_SERVER_VARS['REQUEST_URI']) ) {
     406        } elseif (stristr($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'] )) {
     407            if ('' != $qstr = str_replace($_SERVER['SCRIPT_NAME'], '',
     408                                            $_SERVER['REQUEST_URI']) ) {
    409409                $qstr = preg_replace('/^\//', '', $qstr);
    410410                $qstr = preg_replace("/paged\/\d{0,}\//", '', $qstr);
  • trunk/wp-includes/vars.php

    r1079 r1108  
    104104$is_lynx = 0; $is_gecko = 0; $is_winIE = 0; $is_macIE = 0; $is_opera = 0; $is_NS4 = 0;
    105105if (!isset($HTTP_USER_AGENT)) {
    106     $HTTP_USER_AGENT = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
     106    $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
    107107}
    108108if (preg_match('/Lynx/', $HTTP_USER_AGENT)) {
     
    152152
    153153// Server detection
    154 $is_apache = strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
    155 $is_IIS = strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0;
     154$is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
     155$is_IIS = strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0;
    156156
    157157// if the config file does not provide the smilies array, let's define it here
  • trunk/wp-links-opml.php

    r953 r1108  
    55require('wp-blog-header.php');
    66
    7 $link_cat = $HTTP_GET_VARS['link_cat'];
     7$link_cat = $_GET['link_cat'];
    88if ((empty($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
    99    $sql_cat = '';
  • trunk/wp-login.php

    r966 r1108  
    1616
    1717if (!get_magic_quotes_gpc()) {
    18     $HTTP_GET_VARS    = add_magic_quotes($HTTP_GET_VARS);
    19     $HTTP_POST_VARS   = add_magic_quotes($HTTP_POST_VARS);
    20     $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
     18    $_GET    = add_magic_quotes($_GET);
     19    $_POST   = add_magic_quotes($_POST);
     20    $_COOKIE = add_magic_quotes($_COOKIE);
    2121}
    2222
     
    2626    $wpvar = $wpvarstoreset[$i];
    2727    if (!isset($$wpvar)) {
    28         if (empty($HTTP_POST_VARS["$wpvar"])) {
    29             if (empty($HTTP_GET_VARS["$wpvar"])) {
     28        if (empty($_POST["$wpvar"])) {
     29            if (empty($_GET["$wpvar"])) {
    3030                $$wpvar = '';
    3131            } else {
    32                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     32                $$wpvar = $_GET["$wpvar"];
    3333            }
    3434        } else {
    35             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     35            $$wpvar = $_POST["$wpvar"];
    3636        }
    3737    }
     
    5959case 'login':
    6060
    61     if(!empty($HTTP_POST_VARS)) {
    62         $log = $HTTP_POST_VARS['log'];
    63         $pwd = $HTTP_POST_VARS['pwd'];
    64         $redirect_to = $HTTP_POST_VARS['redirect_to'];
     61    if(!empty($_POST)) {
     62        $log = $_POST['log'];
     63        $pwd = $_POST['pwd'];
     64        $redirect_to = $_POST['redirect_to'];
    6565    }
    6666   
     
    123123        setcookie('wordpressuser_'.$cookiehash, $user_login, time()+31536000);
    124124        setcookie('wordpresspass_'.$cookiehash, md5($user_pass), time()+31536000);
    125         if (empty($HTTP_COOKIE_VARS['wordpressblogid_'.$cookiehash])) {
     125        if (empty($_COOKIE['wordpressblogid_'.$cookiehash])) {
    126126            setcookie('wordpressblogid_'.$cookiehash, 1,time()+31536000);
    127127        }
     
    201201case 'retrievepassword':
    202202
    203     $user_login = $HTTP_POST_VARS["user_login"];
     203    $user_login = $_POST["user_login"];
    204204    $user_data = get_userdatabylogin($user_login);
    205205    $user_email = $user_data->user_email;
     
    233233default:
    234234
    235     if((!empty($HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash])) && (!empty($HTTP_COOKIE_VARS['wordpresspass_'.$cookiehash]))) {
    236         $user_login = $HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash];
    237         $user_pass_md5 = $HTTP_COOKIE_VARS['wordpresspass_'.$cookiehash];
     235    if((!empty($_COOKIE['wordpressuser_'.$cookiehash])) && (!empty($_COOKIE['wordpresspass_'.$cookiehash]))) {
     236        $user_login = $_COOKIE['wordpressuser_'.$cookiehash];
     237        $user_pass_md5 = $_COOKIE['wordpresspass_'.$cookiehash];
    238238    }
    239239
     
    251251
    252252    if ( !(checklogin()) ) {
    253         if (!empty($HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash])) {
     253        if (!empty($_COOKIE['wordpressuser_'.$cookiehash])) {
    254254            $error="Error: wrong login/password"; //, or your session has expired.";
    255255        }
     
    299299    <input type="hidden" name="popuptitle" value="<?php echo $popuptitle ?>" />
    300300<?php } ?>
    301 <?php if (isset($HTTP_GET_VARS["redirect_to"])) { ?>
    302     <input type="hidden" name="redirect_to" value="<?php echo $HTTP_GET_VARS["redirect_to"] ?>" />
     301<?php if (isset($_GET["redirect_to"])) { ?>
     302    <input type="hidden" name="redirect_to" value="<?php echo $_GET["redirect_to"] ?>" />
    303303<?php } else { ?>
    304304    <input type="hidden" name="redirect_to" value="wp-admin/" />
  • trunk/wp-mail.php

    r1094 r1108  
    77timer_start();
    88
    9 $use_cache = 1;
    109$output_debugging_info = 0; # =1 if you want to output debugging info
    1110$time_difference = get_settings('time_difference');
  • trunk/wp-pass.php

    r601 r1108  
    66*/
    77require(dirname(__FILE__) . '/wp-config.php');
    8 setcookie('wp-postpass_'.$cookiehash, $HTTP_POST_VARS['post_password'], time()+60*60*24*30);
    9 header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
     8setcookie('wp-postpass_'.$cookiehash, $_POST['post_password'], time()+60*60*24*30);
     9header('Location: ' . $_SERVER['HTTP_REFERER']);
    1010
    1111?>
  • trunk/wp-register.php

    r957 r1108  
    1414
    1515if (!get_magic_quotes_gpc()) {
    16     $HTTP_GET_VARS    = add_magic_quotes($HTTP_GET_VARS);
    17     $HTTP_POST_VARS   = add_magic_quotes($HTTP_POST_VARS);
    18     $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
     16    $_GET    = add_magic_quotes($_GET);
     17    $_POST   = add_magic_quotes($_POST);
     18    $_COOKIE = add_magic_quotes($_COOKIE);
    1919}
    2020
     
    2323    $wpvar = $wpvarstoreset[$i];
    2424    if (!isset($$wpvar)) {
    25         if (empty($HTTP_POST_VARS["$wpvar"])) {
    26             if (empty($HTTP_GET_VARS["$wpvar"])) {
     25        if (empty($_POST["$wpvar"])) {
     26            if (empty($_GET["$wpvar"])) {
    2727                $$wpvar = '';
    2828            } else {
    29                 $$wpvar = $HTTP_GET_VARS["$wpvar"];
     29                $$wpvar = $_GET["$wpvar"];
    3030            }
    3131        } else {
    32             $$wpvar = $HTTP_POST_VARS["$wpvar"];
     32            $$wpvar = $_POST["$wpvar"];
    3333        }
    3434    }
     
    4747    }
    4848
    49     $user_login = $HTTP_POST_VARS['user_login'];
    50     $pass1 = $HTTP_POST_VARS['pass1'];
    51     $pass2 = $HTTP_POST_VARS['pass2'];
    52     $user_email = $HTTP_POST_VARS['user_email'];
     49    $user_login = $_POST['user_login'];
     50    $pass1 = $_POST['pass1'];
     51    $pass2 = $_POST['pass2'];
     52    $user_email = $_POST['user_email'];
    5353       
    5454    /* checking login has been typed */
     
    8181    }
    8282
    83     $user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'] ;
    84     $user_domain = gethostbyaddr($HTTP_SERVER_VARS['REMOTE_ADDR'] );
    85     $user_browser = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
     83    $user_ip = $_SERVER['REMOTE_ADDR'] ;
     84    $user_domain = gethostbyaddr($_SERVER['REMOTE_ADDR'] );
     85    $user_browser = $_SERVER['HTTP_USER_AGENT'];
    8686
    8787    $user_login = addslashes($user_login);
  • trunk/wp-trackback.php

    r1012 r1108  
    44// trackback is done by a POST
    55$request_array = 'HTTP_POST_VARS';
    6 $tb_id = explode('/', $HTTP_SERVER_VARS['REQUEST_URI']);
     6$tb_id = explode('/', $_SERVER['REQUEST_URI']);
    77$tb_id = intval($tb_id[count($tb_id)-1]);
    8 $tb_url = $HTTP_POST_VARS['url'];
    9 $title = $HTTP_POST_VARS['title'];
    10 $excerpt = $HTTP_POST_VARS['excerpt'];
    11 $blog_name = $HTTP_POST_VARS['blog_name'];
     8$tb_url = $_POST['url'];
     9$title = $_POST['title'];
     10$excerpt = $_POST['excerpt'];
     11$blog_name = $_POST['blog_name'];
    1212
    1313require('wp-blog-header.php');
     
    2222}
    2323
    24 if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_url))) {
     24if ((strlen(''.$tb_id)) && (empty($_GET['__mode'])) && (strlen(''.$tb_url))) {
    2525
    2626    @header('Content-Type: text/xml');
     
    5050    $comment_post_ID = $tb_id;
    5151
    52     $user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
     52    $user_ip = $_SERVER['REMOTE_ADDR'];
    5353    $user_domain = gethostbyaddr($user_ip);
    5454    $time_difference = get_settings('time_difference');
Note: See TracChangeset for help on using the changeset viewer.