WordPress.org

Make WordPress Core

Changeset 17612


Ignore:
Timestamp:
04/06/11 17:07:59 (4 years ago)
Author:
ryan
Message:

Remove setcookie() back compat. Props hakre. see#16920

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r17385 r17612  
    689689    do_action('set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in'); 
    690690 
    691     // Set httponly if the php version is >= 5.2.0 
    692     if ( version_compare(phpversion(), '5.2.0', 'ge') ) { 
    693         setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); 
    694         setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); 
    695         setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true); 
    696         if ( COOKIEPATH != SITECOOKIEPATH ) 
    697             setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true); 
    698     } else { 
    699         $cookie_domain = COOKIE_DOMAIN; 
    700         if ( !empty($cookie_domain) ) 
    701             $cookie_domain .= '; HttpOnly'; 
    702         setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, $cookie_domain, $secure); 
    703         setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, $cookie_domain, $secure); 
    704         setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, $cookie_domain, $secure_logged_in_cookie); 
    705         if ( COOKIEPATH != SITECOOKIEPATH ) 
    706             setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, $cookie_domain, $secure_logged_in_cookie); 
    707     } 
     691    setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); 
     692    setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); 
     693    setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true); 
     694    if ( COOKIEPATH != SITECOOKIEPATH ) 
     695        setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true); 
    708696} 
    709697endif; 
Note: See TracChangeset for help on using the changeset viewer.