r53756 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53755‎ | r53756 | r53757 >
Date:19:23, 25 July 2009
Author:ialex
Status:deferred
Tags:
Comment:
* quiet errors produced by php-openid
* add some debugging in SpecialOpenID::login()
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
@@ -66,7 +66,9 @@
6767 return;
6868 }
6969
 70+ wfSuppressWarnings();
7071 $server =& $this->getServer();
 72+ wfRestoreWarnings();
7173
7274 switch ( $par ) {
7375 case 'Login':
@@ -109,7 +111,10 @@
110112 $query = $_POST;
111113 }
112114
 115+ wfSuppressWarnings();
113116 $request = $server->decodeRequest();
 117+ wfRestoreWarnings();
 118+
114119 $sreg = $this->SregFromQuery( $query );
115120 $response = NULL;
116121 break;
@@ -133,7 +138,9 @@
134139 break;
135140 default:
136141 # For all the other parts, just let the libs do it
 142+ wfSuppressWarnings();
137143 $response =& $server->handleRequest( $request );
 144+ wfRestoreWarnings();
138145 }
139146
140147 # OpenIDServerCheck returns NULL if some output (like a form)
@@ -317,7 +324,9 @@
318325 $response_fields = array_intersect( array_unique( array_merge( $sreg['required'], $sreg['optional'] ) ),
319326 $trust );
320327
 328+ wfSuppressWarnings();
321329 $response = $request->answer( true );
 330+ wfRestoreWarnings();
322331
323332 assert( isset( $response ) );
324333
@@ -481,7 +490,9 @@
482491
483492 $wgOut->disable();
484493
 494+ wfSuppressWarnings();
485495 $wr =& $server->encodeResponse( $response );
 496+ wfRestoreWarnings();
486497
487498 assert( !is_null( $wr ) );
488499
@@ -552,7 +563,6 @@
553564 }
554565
555566 function serverLogin( $request ) {
556 -
557567 global $wgRequest, $wgUser;
558568
559569 assert( isset( $request ) );
Index: trunk/extensions/OpenID/SpecialOpenID.body.php
@@ -180,6 +180,7 @@
181181 $consumer = $this->getConsumer();
182182
183183 if ( !$consumer ) {
 184+ wfDebug( "OpenID: no consumer\n" );
184185 $wgOut->showErrorPage( 'openiderror', 'openiderrortext' );
185186 return;
186187 }
@@ -191,6 +192,7 @@
192193
193194 // Handle failure status return values.
194195 if ( !$auth_request ) {
 196+ wfDebug( "OpenID: no auth_request\n" );
195197 $wgOut->showErrorPage( 'openiderror', 'openiderrortext' );
196198 return;
197199 }

Status & tagging log