Index: trunk/extensions/WikimediaMaintenance/rebuildInterwiki.php |
— | — | @@ -124,6 +124,10 @@ |
125 | 125 | foreach ( $this->languageAliases as $alias => $lang ) { |
126 | 126 | $reserved[$alias] = 1; |
127 | 127 | } |
| 128 | + |
| 129 | + /** |
| 130 | + * @var $site WMFSite |
| 131 | + */ |
128 | 132 | foreach ( $sites as $site ) { |
129 | 133 | $reserved[$site->lateral] = 1; |
130 | 134 | } |
— | — | @@ -174,6 +178,9 @@ |
175 | 179 | } |
176 | 180 | |
177 | 181 | # Links to multilanguage sites |
| 182 | + /** |
| 183 | + * @var $targetSite WMFSite |
| 184 | + */ |
178 | 185 | foreach ( $sites as $targetSite ) { |
179 | 186 | $sql .= $this->makeLink( array( $targetSite->lateral, $targetSite->getURL( 'en', $this->urlprotocol ), 1 ), $first, $db ); |
180 | 187 | } |
— | — | @@ -190,6 +197,7 @@ |
191 | 198 | } else { |
192 | 199 | # Find out which site this DB belongs to |
193 | 200 | $site = false; |
| 201 | + $matches = array(); |
194 | 202 | foreach ( $sites as $candidateSite ) { |
195 | 203 | $suffix = $candidateSite->suffix; |
196 | 204 | if ( preg_match( "/(.*)$suffix$/", $db, $matches ) ) { |
— | — | @@ -213,8 +221,8 @@ |
214 | 222 | # Intermap links |
215 | 223 | foreach ( $iwArray as $iwEntry ) { |
216 | 224 | # Suppress links with the same name as the site |
217 | | - if ( ( $suffix == 'wiki' && $iwEntry['iw_prefix'] != 'wikipedia' ) || |
218 | | - ( $suffix != 'wiki' && $suffix != $iwEntry['iw_prefix'] ) ) |
| 225 | + if ( ( $site->suffix == 'wiki' && $iwEntry['iw_prefix'] != 'wikipedia' ) || |
| 226 | + ( $site->suffix != 'wiki' && $site->suffix != $iwEntry['iw_prefix'] ) ) |
219 | 227 | { |
220 | 228 | $sql .= $this->makeLink( $iwEntry, $first, $db ); |
221 | 229 | } |
— | — | @@ -247,8 +255,6 @@ |
248 | 256 | } |
249 | 257 | } |
250 | 258 | |
251 | | - # ------------------------------------------------------------------------------------------ |
252 | | - |
253 | 259 | /** |
254 | 260 | * Returns part of an INSERT statement, corresponding to all interlanguage links to a particular site |
255 | 261 | * |
Index: trunk/extensions/WikimediaMaintenance/addWiki.php |
— | — | @@ -171,8 +171,8 @@ |
172 | 172 | |
173 | 173 | $this->output( "Script ended. You still have to: |
174 | 174 | * Add any required settings in InitialiseSettings.php |
175 | | - * Run sync-common-all |
176 | | - " ); |
| 175 | + * Run sync-common-all" |
| 176 | + ); |
177 | 177 | } |
178 | 178 | |
179 | 179 | private function getFirstArticle( $ucsite, $name ) { |
Index: trunk/extensions/UnicodeConverter/UnicodeConverter_body.php |
— | — | @@ -13,8 +13,6 @@ |
14 | 14 | function execute( $par ) { |
15 | 15 | global $wgRequest, $wgOut; |
16 | 16 | |
17 | | - |
18 | | - |
19 | 17 | $this->setHeaders(); |
20 | 18 | |
21 | 19 | $q = $wgRequest->getText( 'q' ); |