r79718 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79717‎ | r79718 | r79719 >
Date:13:43, 6 January 2011
Author:ialex
Status:deferred
Tags:
Comment:
Check if the session exists with session_id(), not $wgSessionStarted
Modified paths:
  • /trunk/extensions/OpenID/SpecialOpenID.body.php (modified) (history)
  • /trunk/extensions/OpenID/SpecialOpenIDServer.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenID/SpecialOpenIDServer.body.php
@@ -543,9 +543,7 @@
544544 }
545545
546546 function SaveValues( $request, $sreg ) {
547 - global $wgSessionStarted, $wgUser;
548 -
549 - if ( !$wgSessionStarted ) {
 547+ if( session_id() == '' ) {
550548 wfSetupSession();
551549 }
552550
Index: trunk/extensions/OpenID/SpecialOpenID.body.php
@@ -258,14 +258,14 @@
259259
260260 // Create AX fetch request and add attributes
261261 $ax_request = new Auth_OpenID_AX_FetchRequest;
262 -
 262+
263263 foreach($attribute as $attr){
264264 $ax_request->add($attr);
265265 }
266266
267267 if ($ax_request) {
268268 $auth_request->addExtension($ax_request);
269 - }
 269+ }
270270
271271 $process_url = $this->scriptUrl( $finish_page );
272272
@@ -316,9 +316,7 @@
317317 }
318318
319319 protected function setupSession() {
320 - global $wgSessionStarted;
321 -
322 - if ( !$wgSessionStarted ) {
 320+ if( session_id() == '' ) {
323321 wfSetupSession();
324322 }
325323 }

Status & tagging log