WordPress.org

Make WordPress Core

Changeset 12771


Ignore:
Timestamp:
01/20/10 01:14:05 (4 years ago)
Author:
wpmuguru
Message:

sync single and multisite cookie hash, remove extraneous code, See #11644

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/schema.php

    r12769 r12771  
    688688--The Team @ SITE_NAME')", $network_id ) ); 
    689689    $wpdb->query( $wpdb->prepare( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, %d, 'first_post', 'Welcome to <a href=\"SITE_URL\">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' )", $network_id ) ); 
    690     $weblog_title = stripslashes( $_POST[ 'weblog_title' ] ); 
     690    //@todo - network admins should have a method of editing the network siteurl (used for cookie hash) 
     691    $wpdb->query( $wpdb->prepare( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, %d, 'siteurl', %s)", $network_id, get_option( 'siteurl' ) ) ); 
    691692 
    692693    $current_site->domain = $domain; 
  • trunk/wp-includes/default-constants.php

    r12733 r12771  
    135135             * @since 1.5 
    136136             */ 
    137             if( !defined('COOKIEHASH') ) 
    138                     define('COOKIEHASH', md5(get_option('siteurl'))); 
     137            if ( !defined( 'COOKIEHASH' ) ) { 
     138                $siteurl = get_site_option( 'siteurl' ); 
     139                if ( $siteurl ) 
     140                    define( 'COOKIEHASH', md5( $siteurl ) ); 
     141                else 
     142                    define( 'COOKIEHASH', '' ); 
     143            } 
    139144 
    140145            /** 
  • trunk/wp-includes/ms-load.php

    r12762 r12771  
    4848    if( $current_site->site_name == false ) 
    4949        $current_site->site_name = ucfirst( $current_site->domain ); 
    50  
    51     if ( ! defined('WP_INSTALLING') ) { 
    52         if ( !isset($cookiehash) ) 
    53             $cookiehash = ''; 
    54  
    55         /** 
    56          * Used to guarantee unique hash cookies 
    57          * @since 1.5 
    58          */ 
    59         if ( !defined('COOKIEHASH') ) 
    60                 define( 'COOKIEHASH', $cookiehash ); 
    61     } 
    6250 
    6351    $wpdb->hide_errors(); 
Note: See TracChangeset for help on using the changeset viewer.