Index: trunk/extensions/OpenID/OpenID.hooks.php |
— | — | @@ -5,12 +5,12 @@ |
6 | 6 | * they're so badly written as to be impossible to extend |
7 | 7 | */ |
8 | 8 | class SpecialOpenIDCreateAccount extends SpecialRedirectToSpecial { |
9 | | - function __construct(){ |
| 9 | + function __construct() { |
10 | 10 | parent::__construct( 'SpecialOpenIDCreateAccount', 'OpenIDLogin' ); |
11 | 11 | } |
12 | 12 | } |
13 | 13 | class SpecialOpenIDUserLogin extends SpecialRedirectToSpecial { |
14 | | - function __construct(){ |
| 14 | + function __construct() { |
15 | 15 | parent::__construct( 'SpecialOpenIDUserLogin', 'OpenIDLogin', false, array( 'returnto', 'returntoquery' ) ); |
16 | 16 | } |
17 | 17 | } |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | |
23 | 23 | if ( $wgOpenIDOnly ) { |
24 | 24 | $list['Userlogin'] = 'SpecialOpenIDLogin'; |
25 | | - |
| 25 | + |
26 | 26 | # as Special:CreateAccount is an alias for Special:UserLogin/signup |
27 | 27 | # we show our own OpenID page here, too |
28 | 28 | $list['CreateAccount'] = 'SpecialOpenIDLogin'; |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | } |
79 | 79 | |
80 | 80 | # Add OpenID data if its allowed |
81 | | - if ( !$wgOpenIDClientOnly && !( count( $openid ) && (strlen( $openid[0] ) != 0 ) && !$wgOpenIDAllowServingOpenIDUserAccounts ) ) { |
| 81 | + if ( !$wgOpenIDClientOnly && !( count( $openid ) && ( strlen( $openid[0] ) != 0 ) && !$wgOpenIDAllowServingOpenIDUserAccounts ) ) { |
82 | 82 | $st = SpecialPage::getTitleFor( 'OpenIDServer' ); |
83 | 83 | $wgOut->addLink( array( 'rel' => 'openid.server', |
84 | 84 | 'href' => $st->getFullURL() ) ); |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | public static function onBeforePageDisplay( $out, &$sk ) { |
126 | 126 | global $wgHideOpenIDLoginLink, $wgUser; |
127 | 127 | |
128 | | - # We need to do this *before* PersonalUrls is called |
| 128 | + # We need to do this *before* PersonalUrls is called |
129 | 129 | if ( !$wgHideOpenIDLoginLink && $wgUser->getID() == 0 ) { |
130 | 130 | $out->addHeadItem( 'openidloginstyle', self::loginStyle() ); |
131 | 131 | } |
— | — | @@ -137,7 +137,7 @@ |
138 | 138 | $delTitle = SpecialPage::getTitleFor( 'OpenIDConvert', 'Delete' ); |
139 | 139 | $sk = $user->getSkin(); |
140 | 140 | $rows = ''; |
141 | | - foreach( $urls as $url ) { |
| 141 | + foreach ( $urls as $url ) { |
142 | 142 | $rows .= Xml::tags( 'tr', array(), |
143 | 143 | Xml::tags( 'td', array(), Xml::element( 'a', array( 'href' => $url ), $url ) ) . |
144 | 144 | Xml::tags( 'td', array(), $sk->link( $delTitle, wfMsg( 'openid-urls-delete' ), array(), array( 'url' => $url ) ) ) |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | |
155 | 155 | public static function onGetPreferences( $user, &$preferences ) { |
156 | 156 | global $wgOpenIDShowUrlOnUserPage, $wgAllowRealName; |
157 | | - global $wgAuth,$wgUser,$wgLang; |
| 157 | + global $wgAuth, $wgUser, $wgLang; |
158 | 158 | |
159 | 159 | if ( $wgOpenIDShowUrlOnUserPage == 'user' ) { |
160 | 160 | $preferences['openid-hide'] = |
— | — | @@ -235,29 +235,29 @@ |
236 | 236 | |
237 | 237 | public static function onDeleteAccount( &$userObj ) { |
238 | 238 | global $wgOut; |
239 | | - |
| 239 | + |
240 | 240 | if ( is_object( $userObj ) ) { |
241 | | - |
| 241 | + |
242 | 242 | $username = $userObj->getName(); |
243 | 243 | $userID = $userObj->getID(); |
244 | 244 | |
245 | 245 | $dbw = wfGetDB( DB_MASTER ); |
246 | | - |
| 246 | + |
247 | 247 | $dbw->delete( 'user_openid', array( 'uoi_user' => $userID ) ); |
248 | 248 | $wgOut->addHTML( "OpenID " . wfMsg( 'usermerge-userdeleted', $username, $userID ) ); |
249 | 249 | |
250 | 250 | wfDebug( "OpenID: deleted OpenID user $username ($userID)\n" ); |
251 | 251 | |
252 | 252 | } |
253 | | - |
| 253 | + |
254 | 254 | return true; |
255 | | - |
| 255 | + |
256 | 256 | } |
257 | 257 | |
258 | 258 | public static function onMergeAccountFromTo( &$fromUserObj, &$toUserObj ) { |
259 | | - global $wgOut,$wgOpenIDMergeOnAccountMerge; |
| 259 | + global $wgOut, $wgOpenIDMergeOnAccountMerge; |
260 | 260 | |
261 | | - if ( is_object( $fromUserObj ) && is_object( $toUserObj) ) { |
| 261 | + if ( is_object( $fromUserObj ) && is_object( $toUserObj ) ) { |
262 | 262 | |
263 | 263 | $fromUsername = $fromUserObj->getName(); |
264 | 264 | $fromUserID = $fromUserObj->getID(); |
— | — | @@ -269,7 +269,7 @@ |
270 | 270 | $dbw = wfGetDB( DB_MASTER ); |
271 | 271 | |
272 | 272 | $dbw->update( 'user_openid', array( 'uoi_user' => $toUserID ), array( 'uoi_user' => $fromUserID ) ); |
273 | | - $wgOut->addHTML( "OpenID " . wfMsg('usermerge-updating', 'user_openid', $fromUsername, $toUsername ) . "<br />\n" ); |
| 273 | + $wgOut->addHTML( "OpenID " . wfMsg( 'usermerge-updating', 'user_openid', $fromUsername, $toUsername ) . "<br />\n" ); |
274 | 274 | |
275 | 275 | wfDebug( "OpenID: transferred OpenID(s) of $fromUsername ($fromUserID) => $toUsername ($toUserID)\n" ); |
276 | 276 | |
— | — | @@ -281,9 +281,9 @@ |
282 | 282 | } |
283 | 283 | |
284 | 284 | } |
285 | | - |
| 285 | + |
286 | 286 | return true; |
287 | | - |
| 287 | + |
288 | 288 | } |
289 | 289 | |
290 | 290 | public static function onLoadExtensionSchemaUpdates( $updater = null ) { |
— | — | @@ -297,7 +297,7 @@ |
298 | 298 | $wgExtNewTables[] = array( 'user_openid', "$base/openid_table.pg.sql" ); |
299 | 299 | # This doesn't work since MediaWiki doesn't use $wgUpdates when |
300 | 300 | # updating a PostgreSQL database |
301 | | - #$wgUpdates['postgres'][] = array( array( __CLASS__, 'makeUoiUserNotUnique' ) ); |
| 301 | + # $wgUpdates['postgres'][] = array( array( __CLASS__, 'makeUoiUserNotUnique' ) ); |
302 | 302 | } |
303 | 303 | } else { |
304 | 304 | $dbPatch = "$base/" . ( $updater->getDB()->getType() == 'postgres' ? |
Index: trunk/extensions/OpenID/SpecialOpenIDServer.body.php |
— | — | @@ -543,7 +543,7 @@ |
544 | 544 | } |
545 | 545 | |
546 | 546 | function SaveValues( $request, $sreg ) { |
547 | | - if( session_id() == '' ) { |
| 547 | + if ( session_id() == '' ) { |
548 | 548 | wfSetupSession(); |
549 | 549 | } |
550 | 550 | |
— | — | @@ -737,9 +737,9 @@ |
738 | 738 | $pattern = str_replace( '?', '\?', $pattern ); |
739 | 739 | |
740 | 740 | /* remove "Special:OpenIDXRDS/" to allow construction of a valid user page name */ |
741 | | - $specialPagePrefix = SpecialPage::getTitleFor('OpenIDXRDS'); |
| 741 | + $specialPagePrefix = SpecialPage::getTitleFor( 'OpenIDXRDS' ); |
742 | 742 | if ( $specialPagePrefix != "Special:OpenIDXRDS" ) $specialPagePrefix = "({$specialPagePrefix}|Special:OpenIDXRDS)"; |
743 | | - $relative = preg_replace("!" . $specialPagePrefix . "/!", "", $relative); |
| 743 | + $relative = preg_replace( "!" . $specialPagePrefix . "/!", "", $relative ); |
744 | 744 | |
745 | 745 | # Can't have a pound-sign in the relative, since that's for fragments |
746 | 746 | if ( !preg_match( "#$pattern#", $relative, $matches ) ) { |
Index: trunk/extensions/OpenID/SpecialOpenIDLogin.body.php |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | |
71 | 71 | if ( !is_null( $openid_url ) && strlen( $openid_url ) > 0 ) { |
72 | 72 | $this->login( $openid_url, $this->getTitle( 'Finish' ) ); |
73 | | - } else if (!is_null ( $wgOpenIDConsumerForce )) { |
| 73 | + } else if ( !is_null ( $wgOpenIDConsumerForce ) ) { |
74 | 74 | // if a forced OpenID provider specified, bypass the form |
75 | 75 | $this->login( $wgOpenIDConsumerForce, $this->getTitle( 'Finish' ) ); |
76 | 76 | } else { |
— | — | @@ -151,9 +151,9 @@ |
152 | 152 | ); |
153 | 153 | $wgOut->addWikiMsg( 'openidlogininstructions' ); |
154 | 154 | if ( $wgOpenIDOnly ) { |
155 | | - $wgOut->addWikiMsg('openidlogininstructions-openidloginonly'); |
| 155 | + $wgOut->addWikiMsg( 'openidlogininstructions-openidloginonly' ); |
156 | 156 | } else { |
157 | | - $wgOut->addWikiMsg('openidlogininstructions-passwordloginallowed'); |
| 157 | + $wgOut->addWikiMsg( 'openidlogininstructions-passwordloginallowed' ); |
158 | 158 | } |
159 | 159 | } |
160 | 160 | |
— | — | @@ -242,7 +242,7 @@ |
243 | 243 | # These are only available if all visitors are allowed to create accounts |
244 | 244 | if ( $wgUser->isAllowed( 'createaccount' ) && !$wgUser->isBlockedFromCreateAccount() ) { |
245 | 245 | |
246 | | - if ($wgOpenIDProposeUsernameFromSREG) { |
| 246 | + if ( $wgOpenIDProposeUsernameFromSREG ) { |
247 | 247 | |
248 | 248 | # These options won't exist if we can't get them. |
249 | 249 | if ( array_key_exists( 'nickname', $sreg ) && $this->userNameOK( $sreg['nickname'] ) ) { |
— | — | @@ -263,11 +263,11 @@ |
264 | 264 | if ( array_key_exists( 'fullname', $sreg ) ) { |
265 | 265 | $fullname = $sreg['fullname']; |
266 | 266 | } |
267 | | - |
| 267 | + |
268 | 268 | if ( array_key_exists( 'http://axschema.org/namePerson/first', $ax ) || array_key_exists( 'http://axschema.org/namePerson/last', $ax ) ) { |
269 | 269 | $fullname = $ax['http://axschema.org/namePerson/first'][0] . " " . $ax['http://axschema.org/namePerson/last'][0]; |
270 | 270 | } |
271 | | - |
| 271 | + |
272 | 272 | if ( $fullname && $this->userNameOK( $fullname ) ) { |
273 | 273 | $wgOut->addHTML( |
274 | 274 | Xml::openElement( 'tr' ) . |
— | — | @@ -298,7 +298,7 @@ |
299 | 299 | } |
300 | 300 | } // if $wgOpenIDProposeUsernameFromSREG |
301 | 301 | |
302 | | - if ($wgOpenIDAllowAutomaticUsername) { |
| 302 | + if ( $wgOpenIDAllowAutomaticUsername ) { |
303 | 303 | $wgOut->addHTML( |
304 | 304 | Xml::openElement( 'tr' ) . |
305 | 305 | Xml::tags( 'td', array( 'class' => 'mw-label' ), |
— | — | @@ -311,7 +311,7 @@ |
312 | 312 | ); |
313 | 313 | } |
314 | 314 | |
315 | | - if ($wgOpenIDAllowNewAccountname) { |
| 315 | + if ( $wgOpenIDAllowNewAccountname ) { |
316 | 316 | $wgOut->addHTML( |
317 | 317 | |
318 | 318 | Xml::openElement( 'tr' ) . |
— | — | @@ -381,7 +381,7 @@ |
382 | 382 | } |
383 | 383 | |
384 | 384 | $force = array(); |
385 | | - foreach( array( 'fullname', 'nickname', 'email', 'language' ) as $option ) { |
| 385 | + foreach ( array( 'fullname', 'nickname', 'email', 'language' ) as $option ) { |
386 | 386 | if ( $wgRequest->getCheck( 'wpUpdateUserInfo' . $option ) ) { |
387 | 387 | $force[] = $option; |
388 | 388 | } |
— | — | @@ -448,9 +448,9 @@ |
449 | 449 | // This means the authentication succeeded. |
450 | 450 | wfSuppressWarnings(); |
451 | 451 | $openid = $response->identity_url; |
452 | | - |
453 | | - if (!$this->canLogin($openid)) { |
454 | | - $wgOut->showErrorPage('openidpermission', 'openidpermissiontext'); |
| 452 | + |
| 453 | + if ( !$this->canLogin( $openid ) ) { |
| 454 | + $wgOut->showErrorPage( 'openidpermission', 'openidpermissiontext' ); |
455 | 455 | return; |
456 | 456 | } |
457 | 457 | |
— | — | @@ -474,14 +474,14 @@ |
475 | 475 | $this->displaySuccessLogin( $openid ); |
476 | 476 | } else { |
477 | 477 | // if we are hardcoding nickname, and a valid e-mail address was returned, create a user with this name |
478 | | - if ($wgOpenIDUseEmailAsNickname) { |
| 478 | + if ( $wgOpenIDUseEmailAsNickname ) { |
479 | 479 | $name = $this->getNameFromEmail( $openid, $sreg, $ax ); |
480 | | - if ( !empty($name) && $this->userNameOk( $name ) ) { |
| 480 | + if ( !empty( $name ) && $this->userNameOk( $name ) ) { |
481 | 481 | $wgUser = $this->createUser( $openid, $sreg, $ax, $name ); |
482 | 482 | $this->displaySuccessLogin( $openid ); |
483 | 483 | return; |
484 | 484 | } |
485 | | - } |
| 485 | + } |
486 | 486 | |
487 | 487 | $this->saveValues( $openid, $sreg, $ax ); |
488 | 488 | $this->chooseNameForm( $openid, $sreg, $ax ); |
— | — | @@ -516,7 +516,7 @@ |
517 | 517 | if ( array_key_exists ( 'http://axschema.org/contact/email', $ax ) ) { |
518 | 518 | $email = $ax['http://axschema.org/contact/email'][0]; |
519 | 519 | } |
520 | | - if ($email) { |
| 520 | + if ( $email ) { |
521 | 521 | // If email changed, then email a confirmation mail |
522 | 522 | if ( $email != $user->getEmail() ) { |
523 | 523 | $user->setEmail( $email ); |
— | — | @@ -526,7 +526,7 @@ |
527 | 527 | $user->invalidateEmail(); |
528 | 528 | if ( $wgEmailAuthentication && $email != '' ) { |
529 | 529 | $result = $user->sendConfirmationMail(); |
530 | | - if( WikiError::isError( $result ) ) { |
| 530 | + if ( WikiError::isError( $result ) ) { |
531 | 531 | $wgOut->addWikiMsg( 'mailerror', $result->getMessage() ); |
532 | 532 | } |
533 | 533 | } |
— | — | @@ -542,7 +542,7 @@ |
543 | 543 | } |
544 | 544 | |
545 | 545 | if ( array_key_exists( 'http://axschema.org/namePerson/first', $ax ) || array_key_exists( 'http://axschema.org/namePerson/last', $ax ) ) { |
546 | | - $user->setRealName($ax['http://axschema.org/namePerson/first'][0] . " " . $ax['http://axschema.org/namePerson/last'][0]); |
| 546 | + $user->setRealName( $ax['http://axschema.org/namePerson/first'][0] . " " . $ax['http://axschema.org/namePerson/last'][0] ); |
547 | 547 | } |
548 | 548 | } |
549 | 549 | |
— | — | @@ -630,7 +630,7 @@ |
631 | 631 | $wgAuth->updateUser( $user ); |
632 | 632 | |
633 | 633 | $wgUser = $user; |
634 | | - |
| 634 | + |
635 | 635 | # new user account: not opened by mail |
636 | 636 | wfRunHooks( 'AddNewAccount', array( $user, false ) ); |
637 | 637 | $user->addNewUserLogEntry(); |
— | — | @@ -670,13 +670,13 @@ |
671 | 671 | |
672 | 672 | switch ( $choice ) { |
673 | 673 | case 'nick': |
674 | | - if ($wgOpenIDProposeUsernameFromSREG) return ( ( array_key_exists( 'nickname', $sreg ) ) ? $sreg['nickname'] : null ); |
| 674 | + if ( $wgOpenIDProposeUsernameFromSREG ) return ( ( array_key_exists( 'nickname', $sreg ) ) ? $sreg['nickname'] : null ); |
675 | 675 | break; |
676 | 676 | case 'full': |
677 | | - if (!$wgOpenIDProposeUsernameFromSREG) return; |
| 677 | + if ( !$wgOpenIDProposeUsernameFromSREG ) return; |
678 | 678 | # check the SREG first; only return a value if non-null |
679 | 679 | $fullname = ( ( array_key_exists( 'fullname', $sreg ) ) ? $sreg['fullname'] : null ); |
680 | | - if (!is_null($fullname)) { |
| 680 | + if ( !is_null( $fullname ) ) { |
681 | 681 | return $fullname; |
682 | 682 | } |
683 | 683 | |
— | — | @@ -686,13 +686,13 @@ |
687 | 687 | return $fullname; |
688 | 688 | break; |
689 | 689 | case 'url': |
690 | | - if ($wgOpenIDProposeUsernameFromSREG) return $this->toUserName( $openid ); |
| 690 | + if ( $wgOpenIDProposeUsernameFromSREG ) return $this->toUserName( $openid ); |
691 | 691 | break; |
692 | 692 | case 'auto': |
693 | | - if ($wgOpenIDAllowAutomaticUsername) return $this->automaticName( $sreg ); |
| 693 | + if ( $wgOpenIDAllowAutomaticUsername ) return $this->automaticName( $sreg ); |
694 | 694 | break; |
695 | 695 | case 'manual': |
696 | | - if ($wgOpenIDAllowNewAccountname) return $nameValue; |
| 696 | + if ( $wgOpenIDAllowNewAccountname ) return $nameValue; |
697 | 697 | default: |
698 | 698 | return null; |
699 | 699 | } |
— | — | @@ -706,7 +706,7 @@ |
707 | 707 | } |
708 | 708 | } |
709 | 709 | |
710 | | - function getNameFromEmail($openid, $sreg, $ax) { |
| 710 | + function getNameFromEmail( $openid, $sreg, $ax ) { |
711 | 711 | |
712 | 712 | # return the part before the @ in the e-mail address; |
713 | 713 | # look at AX, then SREG. |
Index: trunk/extensions/OpenID/SpecialOpenID.body.php |
— | — | @@ -252,19 +252,19 @@ |
253 | 253 | // Create attribute request object. Depending on your endpoint, you can request many things: |
254 | 254 | // see http://code.google.com/apis/accounts/docs/OpenID.html#Parameters for parameters. |
255 | 255 | // Usage: make($type_uri, $count=1, $required=false, $alias=null) |
256 | | - $attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/contact/email', 1, 1, 'email'); |
257 | | - $attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson/first', 1, 1, 'firstname'); |
258 | | - $attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson/last', 1, 1, 'lastname'); |
| 256 | + $attribute[] = Auth_OpenID_AX_AttrInfo::make( 'http://axschema.org/contact/email', 1, 1, 'email' ); |
| 257 | + $attribute[] = Auth_OpenID_AX_AttrInfo::make( 'http://axschema.org/namePerson/first', 1, 1, 'firstname' ); |
| 258 | + $attribute[] = Auth_OpenID_AX_AttrInfo::make( 'http://axschema.org/namePerson/last', 1, 1, 'lastname' ); |
259 | 259 | |
260 | 260 | // Create AX fetch request and add attributes |
261 | 261 | $ax_request = new Auth_OpenID_AX_FetchRequest; |
262 | 262 | |
263 | | - foreach($attribute as $attr){ |
264 | | - $ax_request->add($attr); |
| 263 | + foreach ( $attribute as $attr ) { |
| 264 | + $ax_request->add( $attr ); |
265 | 265 | } |
266 | 266 | |
267 | | - if ($ax_request) { |
268 | | - $auth_request->addExtension($ax_request); |
| 267 | + if ( $ax_request ) { |
| 268 | + $auth_request->addExtension( $ax_request ); |
269 | 269 | } |
270 | 270 | |
271 | 271 | $process_url = $this->scriptUrl( $finish_page ); |
— | — | @@ -316,7 +316,7 @@ |
317 | 317 | } |
318 | 318 | |
319 | 319 | protected function setupSession() { |
320 | | - if( session_id() == '' ) { |
| 320 | + if ( session_id() == '' ) { |
321 | 321 | wfSetupSession(); |
322 | 322 | } |
323 | 323 | } |
— | — | @@ -339,7 +339,7 @@ |
340 | 340 | __METHOD__ |
341 | 341 | ); |
342 | 342 | |
343 | | - foreach( $res as $row ) { |
| 343 | + foreach ( $res as $row ) { |
344 | 344 | $openid_urls[] = $row->uoi_openid; |
345 | 345 | } |
346 | 346 | $res->free(); |
Index: trunk/extensions/OpenID/SpecialOpenIDConvert.body.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | function execute( $par ) { |
38 | 38 | global $wgRequest, $wgUser, $wgOut; |
39 | 39 | |
40 | | - if ( !$this->userCanExecute($wgUser) ) { |
| 40 | + if ( !$this->userCanExecute( $wgUser ) ) { |
41 | 41 | $this->displayRestrictionError(); |
42 | 42 | return; |
43 | 43 | } |
— | — | @@ -137,7 +137,7 @@ |
138 | 138 | $wgOut->addHTML( |
139 | 139 | Xml::openElement( 'form', array( 'id' => 'openid_form', 'action' => $this->getTitle()->getLocalUrl(), 'method' => 'post', 'onsubmit' => 'openid.update()' ) ) . |
140 | 140 | Xml::fieldset( wfMsg( 'openidconvertoraddmoreids' ) ) . |
141 | | - Xml::openElement('p') . wfMsg( 'openidconvertinstructions' ) . Xml::closeElement( 'p' ) . |
| 141 | + Xml::openElement( 'p' ) . wfMsg( 'openidconvertinstructions' ) . Xml::closeElement( 'p' ) . |
142 | 142 | $largeButtonsHTML . |
143 | 143 | '<div id="openid_input_area">' . |
144 | 144 | $formsHTML . |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | if ( $wgUser->mPassword == '' ) { |
168 | 168 | $wgOut->showErrorPage( 'openiderror', 'openiddeleteerrornopassword' ); |
169 | 169 | return; |
170 | | - } elseif( $wgOpenIDOnly ) { |
| 170 | + } elseif ( $wgOpenIDOnly ) { |
171 | 171 | $wgOut->showErrorPage( 'openiderror', 'openiddeleteerroropenidonly' ); |
172 | 172 | return; |
173 | 173 | } |
— | — | @@ -216,8 +216,8 @@ |
217 | 217 | // This means the authentication succeeded. |
218 | 218 | $openid_url = $response->identity_url; |
219 | 219 | |
220 | | - if (!$this->canLogin($openid_url)) { |
221 | | - $wgOut->showErrorPage('openidpermission', 'openidpermissiontext'); |
| 220 | + if ( !$this->canLogin( $openid_url ) ) { |
| 221 | + $wgOut->showErrorPage( 'openidpermission', 'openidpermissiontext' ); |
222 | 222 | return; |
223 | 223 | } |
224 | 224 | |
Index: trunk/extensions/OpenID/OpenID.php |
— | — | @@ -61,8 +61,8 @@ |
62 | 62 | |
63 | 63 | /** |
64 | 64 | * Implicitly trust the e-mail address sent from the OpenID server, and don't |
65 | | - * ask the user to verify it. This can lead to people with a nasty OpenID |
66 | | - * provider setting up accounts and spamming |
| 65 | + * ask the user to verify it. This can lead to people with a nasty OpenID |
| 66 | + * provider setting up accounts and spamming |
67 | 67 | */ |
68 | 68 | $wgOpenIDTrustEmailAddress = false; |
69 | 69 | |
— | — | @@ -104,8 +104,8 @@ |
105 | 105 | $wgOpenIDConsumerDeny = array(); |
106 | 106 | |
107 | 107 | /** |
108 | | - * Force this server to only allow authentication against one server; |
109 | | - * hides the selection form entirely. |
| 108 | + * Force this server to only allow authentication against one server; |
| 109 | + * hides the selection form entirely. |
110 | 110 | */ |
111 | 111 | $wgOpenIDConsumerForce = null; |
112 | 112 | |
Index: trunk/extensions/OpenID/SpecialOpenIDDashboard.body.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | global $wgOpenIDAllowServingOpenIDUserAccounts; |
67 | 67 | global $wgOpenIDShowProviderIcons; |
68 | 68 | |
69 | | - if ( !$this->userCanExecute($wgUser) ) { |
| 69 | + if ( !$this->userCanExecute( $wgUser ) ) { |
70 | 70 | $this->displayRestrictionError(); |
71 | 71 | return; |
72 | 72 | } |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | |
78 | 78 | $this->setHeaders(); |
79 | 79 | $this->outputHeader(); |
80 | | - |
| 80 | + |
81 | 81 | $wgOut->addWikiMsg( 'openid-dashboard-introduction', 'http://www.mediawiki.org/wiki/Extension:OpenID' ); |
82 | 82 | |
83 | 83 | $wgOut->addHTML( |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | $out .= $this->show( '$wgOpenIDProposeUsernameFromSREG', $wgOpenIDProposeUsernameFromSREG ); |
97 | 97 | $out .= $this->show( '$wgOpenIDShowUrlOnUserPage', $wgOpenIDShowUrlOnUserPage ); |
98 | 98 | $out .= $this->show( '$wgOpenIDShowProviderIcons', $wgOpenIDShowProviderIcons ); |
99 | | - |
| 99 | + |
100 | 100 | $out .= $this->show( 'Number of users (total)', $totalUsers ); |
101 | 101 | $out .= $this->show( 'Number of users with OpenID', $OpenIDdistinctUsers ); |
102 | 102 | $out .= $this->show( 'Number of OpenIDs (total)', $OpenIDUsers ); |
Index: trunk/extensions/OpenID/optionToTable.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | |
39 | 39 | public function execute() { |
40 | 40 | $dbr = wfGetDB( DB_SLAVE ); |
41 | | - if( !$dbr->tableExists( 'user_properties' ) ) { |
| 41 | + if ( !$dbr->tableExists( 'user_properties' ) ) { |
42 | 42 | $this->error( "The OpenID extension requires at least MediaWiki 1.16.", true ); |
43 | 43 | } |
44 | 44 | |
— | — | @@ -45,8 +45,8 @@ |
46 | 46 | $dbr = wfGetDB( DB_SLAVE ); |
47 | 47 | $res = $dbr->select( array( 'user_properties' ), array( 'up_user' ), |
48 | 48 | array( 'up_property' => 'openid_url' ), __METHOD__ ); |
49 | | - if( $dbr->numRows( $res ) ) { |
50 | | - foreach( $res as $row ) { |
| 49 | + if ( $dbr->numRows( $res ) ) { |
| 50 | + foreach ( $res as $row ) { |
51 | 51 | $user = User::newFromId( $row->up_user ); |
52 | 52 | $this->output( "\n\tFixing {$user->getName()}" ); |
53 | 53 | SpecialOpenID::addUserUrl( $user, $user->getOption( 'openid_url' ) ); |
Index: trunk/extensions/OpenID/DatabaseConnection.php |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | return false; |
75 | 75 | |
76 | 76 | $ret = array(); |
77 | | - foreach( $res as $row ) { |
| 77 | + foreach ( $res as $row ) { |
78 | 78 | $ret[] = (array)$row; |
79 | 79 | } |
80 | 80 | return $ret; |