Index: trunk/extensions/OpenID/OpenID.i18n.php |
— | — | @@ -122,6 +122,8 @@ |
123 | 123 | 'openid-urls-desc' => 'OpenIDs associated with your account:', |
124 | 124 | 'openid-urls-url' => 'URL', |
125 | 125 | 'openid-urls-action' => 'Action', |
| 126 | + 'openid-urls-registration' => 'Registration time', |
| 127 | + 'openid-urls-registration-date-time' => '$1', # only translate this message to other languages if you have to change it |
126 | 128 | 'openid-urls-delete' => 'Delete', |
127 | 129 | 'openid-add-url' => 'Add a new OpenID', |
128 | 130 | |
Index: trunk/extensions/OpenID/README.OpenID-mediawiki-extension |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | MediaWiki OpenID extension README.OpenID-mediawiki-extension file |
3 | | -version 0.937-beta 20110019 |
| 3 | +version 0.938-beta 20110920 |
4 | 4 | |
5 | 5 | Homepage and manual http://www.mediawiki.org/wiki/Extension:OpenID |
6 | 6 | |
— | — | @@ -476,6 +476,7 @@ |
477 | 477 | into that account now |
478 | 478 | |
479 | 479 | == CHANGES == |
| 480 | +* 0.938 list uoi_user_registration timestamp if present in openid-preference tab |
480 | 481 | * 0.937 added uoi_user_registration timestamp field (bug30623) |
481 | 482 | * 0.934 fixes |
482 | 483 | bug 29543 After logging in with OpenID, user page link in the personal toolbar |
Index: trunk/extensions/OpenID/OpenID.hooks.php |
— | — | @@ -133,27 +133,54 @@ |
134 | 134 | } |
135 | 135 | |
136 | 136 | private static function getInfoTable( $user ) { |
137 | | - $urls = SpecialOpenID::getUserUrl( $user ); |
| 137 | + global $wgLang; |
| 138 | + $openid_urls_registration = SpecialOpenID::getUserUrl( $user ); |
138 | 139 | $delTitle = SpecialPage::getTitleFor( 'OpenIDConvert', 'Delete' ); |
139 | 140 | $sk = $user->getSkin(); |
140 | 141 | $rows = ''; |
141 | | - foreach ( $urls as $url ) { |
| 142 | + foreach ( $openid_urls_registration as $url_reg ) { |
| 143 | + |
| 144 | + if ( !empty( $url_reg->uoi_user_registration ) ) { $registrationTime = wfMsgExt( |
| 145 | + 'openid-urls-registration-date-time', |
| 146 | + 'parsemag', |
| 147 | + $wgLang->timeanddate( $url_reg->uoi_user_registration, true ), |
| 148 | + $wgLang->date( $url_reg->uoi_user_registration, true ), |
| 149 | + $wgLang->time( $url_reg->uoi_user_registration, true ) |
| 150 | + ); |
| 151 | + } else { |
| 152 | + $registrationTime = ''; |
| 153 | + } |
| 154 | + |
142 | 155 | $rows .= Xml::tags( 'tr', array(), |
143 | 156 | Xml::tags( 'td', |
144 | 157 | array(), |
145 | | - Xml::element( 'a', array( 'href' => $url ), $url ) |
| 158 | + Xml::element( 'a', array( 'href' => $url_reg->uoi_openid ), $url_reg->uoi_openid ) |
146 | 159 | ) . |
147 | 160 | Xml::tags( 'td', |
148 | 161 | array(), |
| 162 | + $registrationTime |
| 163 | + ) . |
| 164 | + Xml::tags( 'td', |
| 165 | + array(), |
149 | 166 | $sk->link( $delTitle, wfMsgHtml( 'openid-urls-delete' ), |
150 | 167 | array(), |
151 | | - array( 'url' => $url ) |
| 168 | + array( 'url' => $url_reg->uoi_openid ) |
152 | 169 | ) |
153 | 170 | ) |
154 | 171 | ) . "\n"; |
155 | 172 | } |
156 | 173 | $info = Xml::tags( 'table', array( 'class' => 'wikitable' ), |
157 | | - Xml::tags( 'tr', array(), Xml::element( 'th', array(), wfMsg( 'openid-urls-url' ) ) . Xml::element( 'th', array(), wfMsg( 'openid-urls-action' ) ) ) . "\n" . |
| 174 | + Xml::tags( 'tr', array(), |
| 175 | + Xml::element( 'th', |
| 176 | + array(), |
| 177 | + wfMsg( 'openid-urls-url' ) ) . |
| 178 | + Xml::element( 'th', |
| 179 | + array(), |
| 180 | + wfMsg( 'openid-urls-registration' ) ) . |
| 181 | + Xml::element( 'th', |
| 182 | + array(), |
| 183 | + wfMsg( 'openid-urls-action' ) ) |
| 184 | + ) . "\n" . |
158 | 185 | $rows |
159 | 186 | ); |
160 | 187 | $info .= $sk->link( SpecialPage::getTitleFor( 'OpenIDConvert' ), wfMsgHtml( 'openid-add-url' ) ); |
Index: trunk/extensions/OpenID/SpecialOpenID.body.php |
— | — | @@ -327,8 +327,9 @@ |
328 | 328 | } |
329 | 329 | |
330 | 330 | # Find the user with the given openid, if any |
| 331 | + # return openid url and registration timestamp |
331 | 332 | public static function getUserUrl( $user ) { |
332 | | - $openid_urls = array(); |
| 333 | + $openid_urls_registration = array(); |
333 | 334 | |
334 | 335 | if ( $user instanceof User && $user->getId() != 0 ) { |
335 | 336 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -340,11 +341,11 @@ |
341 | 342 | ); |
342 | 343 | |
343 | 344 | foreach ( $res as $row ) { |
344 | | - $openid_urls[] = $row->uoi_openid; |
| 345 | + $openid_urls_registration[] = $row; |
345 | 346 | } |
346 | 347 | $res->free(); |
347 | 348 | } |
348 | | - return $openid_urls; |
| 349 | + return $openid_urls_registration; |
349 | 350 | } |
350 | 351 | |
351 | 352 | public static function getUserFromUrl( $openid ) { |
Index: trunk/extensions/OpenID/OpenID.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | exit( 1 ); |
29 | 29 | } |
30 | 30 | |
31 | | -define( 'MEDIAWIKI_OPENID_VERSION', '0.937-beta 20110919' ); |
| 31 | +define( 'MEDIAWIKI_OPENID_VERSION', '0.938-beta 20110920' ); |
32 | 32 | |
33 | 33 | $path = dirname( __FILE__ ); |
34 | 34 | set_include_path( implode( PATH_SEPARATOR, array( $path ) ) . PATH_SEPARATOR . get_include_path() ); |