Make WordPress Core


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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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   
Note: See TracChangeset for help on using the changeset viewer.