Make WordPress Core


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

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

File:
1 edited

Legend:

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