r98125 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98124‎ | r98125 | r98126 >
Date:11:52, 26 September 2011
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* (bug 31165) Fix errors when displaying OpenID url on user page
Modified paths:
  • /trunk/extensions/OpenID/OpenID.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenID/OpenID.hooks.php
@@ -59,7 +59,7 @@
6060 $user = User::newFromName( $nt->getText() );
6161 if ( $user && $user->getID() != 0 ) {
6262 $openid = SpecialOpenID::getUserOpenIDInformation( $user );
63 - if ( count( $openid ) && strlen( $openid[0] ) != 0 ) {
 63+ if ( count( $openid ) && strlen( $openid[0]->uoi_openid ) != 0 ) {
6464 global $wgOpenIDShowUrlOnUserPage;
6565
6666 if ( $wgOpenIDShowUrlOnUserPage == 'always' ||
@@ -67,8 +67,8 @@
6868 {
6969 global $wgOpenIDLoginLogoUrl;
7070
71 - $url = SpecialOpenID::OpenIDToUrl( $openid[0] );
72 - $disp = htmlspecialchars( $openid[0] );
 71+ $url = SpecialOpenID::OpenIDToUrl( $openid[0]->uoi_openid );
 72+ $disp = htmlspecialchars( $openid[0]->uoi_openid );
7373 $wgOut->setSubtitle( "<span class='subpages'>" .
7474 "<img src='$wgOpenIDLoginLogoUrl' alt='OpenID' />" .
7575 "<a href='$url'>$disp</a>" .
@@ -77,7 +77,7 @@
7878 }
7979
8080 # Add OpenID data if its allowed
81 - if ( !$wgOpenIDClientOnly && !( count( $openid ) && ( strlen( $openid[0] ) != 0 ) && !$wgOpenIDAllowServingOpenIDUserAccounts ) ) {
 81+ if ( !$wgOpenIDClientOnly && !( count( $openid ) && ( strlen( $openid[0]->uoi_openid ) != 0 ) && !$wgOpenIDAllowServingOpenIDUserAccounts ) ) {
8282 $st = SpecialPage::getTitleFor( 'OpenIDServer' );
8383 $wgOut->addLink( array( 'rel' => 'openid.server',
8484 'href' => $st->getFullURL() ) );

Comments

#Comment by Wikinaut (talk | contribs)   21:22, 26 September 2011

Very good point, thanks for fixing! I overlooked to fix this here, too.

Status & tagging log