Index: trunk/phase3/includes/Article.php |
— | — | @@ -2913,8 +2913,6 @@ |
2914 | 2914 | |
2915 | 2915 | // If the page has a history, insert a warning |
2916 | 2916 | if ( $hasHistory && !$confirm ) { |
2917 | | - global $wgLang; |
2918 | | - |
2919 | 2917 | $skin = $wgUser->getSkin(); |
2920 | 2918 | $revisions = $this->estimateRevisionCount(); |
2921 | 2919 | //FIXME: lego |
— | — | @@ -2925,8 +2923,6 @@ |
2926 | 2924 | ); |
2927 | 2925 | |
2928 | 2926 | if ( $bigHistory ) { |
2929 | | - global $wgDeleteRevisionsLimit; |
2930 | | - |
2931 | 2927 | $wgOut->wrapWikiMsg( "<div class='error'>\n$1\n</div>\n", |
2932 | 2928 | array( 'delete-warning-toobig', $wgLang->formatNum( $wgDeleteRevisionsLimit ) ) ); |
2933 | 2929 | } |
— | — | @@ -3123,7 +3119,7 @@ |
3124 | 3120 | * Perform a deletion and output success or failure messages |
3125 | 3121 | */ |
3126 | 3122 | public function doDelete( $reason, $suppress = false ) { |
3127 | | - global $wgOut; |
| 3123 | + global $wgOut, $wgUser; |
3128 | 3124 | |
3129 | 3125 | $id = $this->mTitle->getArticleID( GAID_FOR_UPDATE ); |
3130 | 3126 | |
— | — | @@ -4350,6 +4346,8 @@ |
4351 | 4347 | * @return string An appropriate autosummary, or an empty string. |
4352 | 4348 | */ |
4353 | 4349 | public static function getAutosummary( $oldtext, $newtext, $flags ) { |
| 4350 | + global $wgContLang; |
| 4351 | + |
4354 | 4352 | # Decide what kind of autosummary is needed. |
4355 | 4353 | |
4356 | 4354 | # Redirect autosummaries |
— | — | @@ -4363,7 +4361,6 @@ |
4364 | 4362 | # New page autosummaries |
4365 | 4363 | if ( $flags & EDIT_NEW && strlen( $newtext ) ) { |
4366 | 4364 | # If they're making a new article, give its text, truncated, in the summary. |
4367 | | - global $wgContLang; |
4368 | 4365 | |
4369 | 4366 | $truncatedtext = $wgContLang->truncate( |
4370 | 4367 | str_replace( "\n", ' ', $newtext ), |
— | — | @@ -4377,7 +4374,6 @@ |
4378 | 4375 | return wfMsgForContent( 'autosumm-blank' ); |
4379 | 4376 | } elseif ( strlen( $oldtext ) > 10 * strlen( $newtext ) && strlen( $newtext ) < 500 ) { |
4380 | 4377 | # Removing more than 90% of the article |
4381 | | - global $wgContLang; |
4382 | 4378 | |
4383 | 4379 | $truncatedtext = $wgContLang->truncate( |
4384 | 4380 | $newtext, |