Index: trunk/extensions/CentralAuth/ApiQueryGlobalUserInfo.php |
— | — | @@ -78,8 +78,11 @@ |
79 | 79 | if ( $userExists && isset( $prop['merged'] ) ) { |
80 | 80 | $accounts = $user->queryAttached(); |
81 | 81 | foreach ( $accounts as $account ) { |
| 82 | + $dbname = $account['wiki']; |
| 83 | + |
82 | 84 | $a = array( |
83 | | - 'wiki' => $account['wiki'], |
| 85 | + 'wiki' => $dbname, |
| 86 | + 'url' => $this->getUrl( $dbname ), |
84 | 87 | 'timestamp' => wfTimestamp( TS_ISO_8601, $account['attachedTimestamp'] ), |
85 | 88 | 'method' => $account['attachedMethod'], |
86 | 89 | 'editcount' => $account['editCount'] |
— | — | @@ -113,6 +116,15 @@ |
114 | 117 | } |
115 | 118 | } |
116 | 119 | |
| 120 | + public function getUrl( $dbname ){ |
| 121 | + global $wgConf; |
| 122 | + |
| 123 | + list( $major, $minor ) = $wgConf->siteFromDB( $dbname ); |
| 124 | + $minor = str_replace( '_', '-', $minor ); |
| 125 | + return $wgConf->get( 'wgServer', $dbname, $major, |
| 126 | + array( 'lang' => $minor, 'site' => $major ) ); |
| 127 | + } |
| 128 | + |
117 | 129 | public function getCacheMode( $params ) { |
118 | 130 | if ( !is_null( $params['user'] ) ) { |
119 | 131 | // URL determines user, public caching is fine |