r107339 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107338‎ | r107339 | r107340 >
Date:19:57, 26 December 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
< 5.2 hacks? Pffft - Long Live 5.2.3!
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuthUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/CentralAuthUser.php
@@ -1817,26 +1817,13 @@
18181818 // Relative expiry
18191819 $exp += time();
18201820 }
1821 - $httpOnlySafe = version_compare( "5.2", PHP_VERSION, "<" );
1822 -
1823 - if ( $httpOnlySafe && isset( $wgCookieHttpOnly ) ) {
1824 - setcookie( $wgCentralAuthCookiePrefix . $name,
1825 - $value,
1826 - $exp,
1827 - '/',
1828 - $wgCentralAuthCookieDomain,
1829 - $wgCookieSecure,
1830 - $wgCookieHttpOnly );
1831 - } else {
1832 - // setcookie() fails on PHP 5.1 if you give it future-compat paramters.
1833 - // stab stab!
1834 - setcookie( $wgCentralAuthCookiePrefix . $name,
1835 - $value,
1836 - $exp,
1837 - '/',
1838 - $wgCentralAuthCookieDomain,
1839 - $wgCookieSecure );
1840 - }
 1821+ setcookie( $wgCentralAuthCookiePrefix . $name,
 1822+ $value,
 1823+ $exp,
 1824+ '/',
 1825+ $wgCentralAuthCookieDomain,
 1826+ $wgCookieSecure,
 1827+ $wgCookieHttpOnly );
18411828 }
18421829
18431830 /**

Comments

#Comment by Nikerabbit (talk | contribs)   09:49, 5 January 2012

Weird way to indent a function call.

Status & tagging log