diff options
| author | matt <matt@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-07-18 20:02:27 +0000 |
|---|---|---|
| committer | matt <matt@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-07-18 20:02:27 +0000 |
| commit | 987d9d09b813bf26661ea0735f2c9d4ec5cedd23 (patch) | |
| tree | 82fd35159670438aefa23a29a06b5de8793cadc9 | |
| parent | e1b146152422500f8f99eacaa06f71422e3202ba (diff) | |
Porting changes from WP
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@42 7be80a69-a1ef-0310-a953-fb0f7c49ff36
| -rw-r--r-- | wp-inst/wp-includes/pluggable-functions.php | 16 | ||||
| -rw-r--r-- | wp-inst/wp-includes/vars.php | 4 | ||||
| -rw-r--r-- | wp-inst/wp-settings.php | 11 |
3 files changed, 19 insertions, 12 deletions
diff --git a/wp-inst/wp-includes/pluggable-functions.php b/wp-inst/wp-includes/pluggable-functions.php index c32f852..b76b263 100644 --- a/wp-inst/wp-includes/pluggable-functions.php +++ b/wp-inst/wp-includes/pluggable-functions.php @@ -191,22 +191,22 @@ function wp_setcookie($username, $password, $already_md5 = false, $home = '', $s $cookiehash = md5($siteurl); } - setcookie('wordpressuser_'. $cookiehash, $username, time() + 31536000, $cookiepath); - setcookie('wordpresspass_'. $cookiehash, $password, time() + 31536000, $cookiepath); + setcookie(USER_COOKIE, $username, time() + 31536000, $cookiepath, COOKIE_DOMAIN); + setcookie(PASS_COOKIE, $password, time() + 31536000, $cookiepath, COOKIE_DOMAIN); if ( $cookiepath != $sitecookiepath ) { - setcookie('wordpressuser_'. $cookiehash, $username, time() + 31536000, $sitecookiepath); - setcookie('wordpresspass_'. $cookiehash, $password, time() + 31536000, $sitecookiepath); + setcookie(USER_COOKIE, $username, time() + 31536000, $sitecookiepath, COOKIE_DOMAIN); + setcookie(PASS_COOKIE, $password, time() + 31536000, $sitecookiepath, COOKIE_DOMAIN); } } endif; if ( !function_exists('wp_clearcookie') ) : function wp_clearcookie() { - setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH); - setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH); - setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, SITECOOKIEPATH); - setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, SITECOOKIEPATH); + setcookie(USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); + setcookie(PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); + setcookie(USER_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); + setcookie(PASS_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); } endif; diff --git a/wp-inst/wp-includes/vars.php b/wp-inst/wp-includes/vars.php index 494f285..2e1dcec 100644 --- a/wp-inst/wp-includes/vars.php +++ b/wp-inst/wp-includes/vars.php @@ -106,8 +106,4 @@ foreach($wpsmiliestrans as $smiley => $img) { $wp_smiliesreplace[] = " <img src='" . get_settings('siteurl') . "/wp-images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> "; } -// Path for cookies -define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('home') . '/' ) ); -define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('siteurl') . '/' ) ); - ?>
\ No newline at end of file diff --git a/wp-inst/wp-settings.php b/wp-inst/wp-settings.php index 66231b2..fb45454 100644 --- a/wp-inst/wp-settings.php +++ b/wp-inst/wp-settings.php @@ -166,6 +166,17 @@ if (!strstr($_SERVER['PHP_SELF'], 'install.php') && !strstr($_SERVER['PHP_SELF'] define('COOKIEHASH', $cookiehash); endif; +if ( !defined('USER_COOKIE') ) + define('USER_COOKIE', 'wordpressuser_'. COOKIEHASH); +if ( !defined('PASS_COOKIE') ) + define('PASS_COOKIE', 'wordpresspass_'. COOKIEHASH); +if ( !defined('COOKIEPATH') ) + define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('home') . '/' ) ); +if ( !defined('SITECOOKIEPATH') ) + define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('siteurl') . '/' ) ); +if ( !defined('COOKIE_DOMAIN') ) + define('COOKIE_DOMAIN', false); + require (ABSPATH . WPINC . '/vars.php'); do_action('core_files_loaded'); |
