Make WordPress Core

Changeset 1108 for trunk/wp-login.php


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

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

File:
1 edited

Legend:

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