Make WordPress Core


Ignore:
Timestamp:
10/20/2003 08:53:13 PM (22 years ago)
Author:
emc3
Message:

Cookies are now unique, based on siteurl, allowing multiple installs under a single domain name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2-include/b2template.functions.php

    r440 r458  
    599599function get_the_content($more_link_text='(more...)', $stripteaser=0, $more_file='') {
    600600    global $id, $post, $more, $c, $withcomments, $page, $pages, $multipage, $numpages;
    601     global $HTTP_SERVER_VARS, $HTTP_COOKIE_VARS, $preview;
     601    global $HTTP_SERVER_VARS, $HTTP_COOKIE_VARS, $preview, $cookiehash;
    602602    global $querystring_start, $querystring_equal, $querystring_separator;
    603603    global $pagenow;
     
    605605   
    606606    if (!empty($post->post_password)) { // if there's a password
    607         if ($HTTP_COOKIE_VARS['wp-postpass'] != $post->post_password) {  // and it doesn't match the cookie
     607        if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie
    608608            $output = get_the_password_form();
    609609            return $output;
     
    693693function get_the_excerpt($fakeit = false) {
    694694    global $id, $post;
    695     global $HTTP_SERVER_VARS, $HTTP_COOKIE_VARS, $preview;
     695    global $HTTP_SERVER_VARS, $HTTP_COOKIE_VARS, $preview, $cookiehash;
    696696    $output = '';
    697697    $output = stripslashes($post->post_excerpt);
    698698    if (!empty($post->post_password)) { // if there's a password
    699         if ($HTTP_COOKIE_VARS['wp-postpass'] != $post->post_password) {  // and it doesn't match the cookie
     699        if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie
    700700            $output = "There is no excerpt because this is a protected post.";
    701701            return $output;
     
    11741174
    11751175function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') {
    1176     global $id, $b2commentspopupfile, $b2commentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS;
     1176    global $id, $b2commentspopupfile, $b2commentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash;
    11771177    global $querystring_start, $querystring_equal, $querystring_separator, $siteurl;
    11781178    $number = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_post_ID = $id");
     
    11821182    } else {
    11831183        if (!empty($post->post_password)) { // if there's a password
    1184             if ($HTTP_COOKIE_VARS['wp-postpass'] != $post->post_password) {  // and it doesn't match the cookie
     1184            if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie
    11851185                echo("Enter your password to view comments");
    11861186                return;
Note: See TracChangeset for help on using the changeset viewer.