Make WordPress Core


Ignore:
Timestamp:
10/10/2004 06:02:30 PM (22 years ago)
Author:
saxmatt
Message:

Move to cookiehash define, use wp_login() function for auth.php.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-comment.php

    r1726 r1768  
    1818
    1919function comments_template() {
    20         global $withcomments, $post, $wpdb, $id, $comment, $cookiehash;
     20        global $withcomments, $post, $wpdb, $id, $comment;
    2121
    2222        if ( is_single() || $withcomments ) :
    2323                $req = get_settings('require_name_email');
    24         $comment_author = isset($_COOKIE['comment_author_'.$cookiehash]) ? trim(stripslashes($_COOKIE['comment_author_'.$cookiehash])) : '';
    25                 $comment_author_email = isset($_COOKIE['comment_author_email_'.$cookiehash]) ? trim(stripslashes($_COOKIE['comment_author_email_'.$cookiehash])) : '';
    26                 $comment_author_url = isset($_COOKIE['comment_author_url_'.$cookiehash]) ? trim(stripslashes($_COOKIE['comment_author_url_'.$cookiehash])) : '';
     24        $comment_author = isset($_COOKIE['comment_author_'.COOKIEHASH]) ? trim(stripslashes($_COOKIE['comment_author_'.COOKIEHASH])) : '';
     25                $comment_author_email = isset($_COOKIE['comment_author_email_'.COOKIEHASH]) ? trim(stripslashes($_COOKIE['comment_author_email_'.COOKIEHASH])) : '';
     26                $comment_author_url = isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ? trim(stripslashes($_COOKIE['comment_author_url_'.COOKIEHASH])) : '';
    2727                $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date");
    2828
    … …  
    9191
    9292function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') {
    93     global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $cookiehash;
     93    global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb;
    9494    global $querystring_start, $querystring_equal, $querystring_separator;
    9595    global $comment_count_cache;
    … …  
    106106    } else {
    107107        if (!empty($post->post_password)) { // if there's a password
    108             if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie
     108            if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
    109109                echo('Enter your password to view comments');
    110110                return;
Note: See TracChangeset for help on using the changeset viewer.