Changeset 737
- Timestamp:
- 09/12/06 09:17:44 (2 years ago)
- Files:
-
- trunk/wp-includes/pluggable.php (modified) (3 diffs)
- trunk/wp-settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/pluggable.php
r729 r737 295 295 $password = md5( md5($password) ); // Double hash the password in the cookie. 296 296 297 if ( empty($home) )298 $cookiepath = COOKIEPATH;299 else300 $cookiepath = preg_replace('|https?://[^/]+|i', '', $home . '/' );301 302 if ( empty($siteurl) ) {303 $sitecookiepath = SITECOOKIEPATH;304 $cookiehash = COOKIEHASH;305 } else {306 $sitecookiepath = preg_replace('|https?://[^/]+|i', '', $siteurl . '/' );307 $cookiehash = md5($siteurl);308 }309 310 297 if ( $remember ) 311 298 $expire = time() + 31536000; … … 313 300 $expire = 0; 314 301 315 setcookie(USER_COOKIE, $username, $expire, $cookiepath, COOKIE_DOMAIN); 316 setcookie(PASS_COOKIE, $password, $expire, $cookiepath, COOKIE_DOMAIN); 317 318 if ( $cookiepath != $sitecookiepath ) { 319 setcookie(USER_COOKIE, $username, $expire, $sitecookiepath, COOKIE_DOMAIN); 320 setcookie(PASS_COOKIE, $password, $expire, $sitecookiepath, COOKIE_DOMAIN); 321 } 302 global $base; 303 setcookie(USER_COOKIE, $username, $expire, $base, COOKIE_DOMAIN); 304 setcookie(PASS_COOKIE, $password, $expire, $base, COOKIE_DOMAIN); 322 305 } 323 306 endif; … … 325 308 if ( !function_exists('wp_clearcookie') ) : 326 309 function wp_clearcookie() { 327 setcookie(USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); 328 setcookie(PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); 329 setcookie(USER_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); 330 setcookie(PASS_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); 310 global $base; 311 setcookie(USER_COOKIE, ' ', time() - 31536000, $base, COOKIE_DOMAIN); 312 setcookie(PASS_COOKIE, ' ', time() - 31536000, $base, COOKIE_DOMAIN); 331 313 } 332 314 endif; trunk/wp-settings.php
r734 r737 228 228 define('PASS_COOKIE', 'wordpresspass'); 229 229 if ( !defined('COOKIEPATH') ) 230 define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home') . '/' ));230 define('COOKIEPATH', $current_site->path ); 231 231 if ( !defined('SITECOOKIEPATH') ) 232 define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ));232 define('SITECOOKIEPATH', $current_site->path ); 233 233 if ( !defined('COOKIE_DOMAIN') ) 234 234 define('COOKIE_DOMAIN', '.' . $current_site->domain);
