Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | const AS_HOOK_ERROR = 210; |
39 | 39 | |
40 | 40 | /** |
41 | | - * Status: The filter function set in $wgFilterCallback returned true (= block it) |
| 41 | + * Status: The filter function set in $wgFilterCallback returned true (= block it) |
42 | 42 | */ |
43 | 43 | const AS_FILTERING = 211; |
44 | 44 | |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | * @var ParserOutput |
184 | 184 | */ |
185 | 185 | var $mParserOutput; |
186 | | - |
| 186 | + |
187 | 187 | /** |
188 | 188 | * Has a summary been preset using GET parameter &summary= ? |
189 | 189 | * @var Bool |
— | — | @@ -475,7 +475,7 @@ |
476 | 476 | */ |
477 | 477 | function readOnlyPage( $source = null, $protected = false, $reasons = array(), $action = null ) { |
478 | 478 | wfDeprecated( __METHOD__, '1.19' ); |
479 | | - |
| 479 | + |
480 | 480 | global $wgRequest, $wgOut; |
481 | 481 | if ( $wgRequest->getBool( 'redlink' ) ) { |
482 | 482 | // The edit page was reached via a red link. |
— | — | @@ -582,7 +582,7 @@ |
583 | 583 | # header syntax, e.g. 'Foobar'. This is mainly an issue when we are using wpSummary for |
584 | 584 | # section titles. |
585 | 585 | $this->summary = preg_replace( '/^\s*=+\s*(.*?)\s*=+\s*$/', '$1', $this->summary ); |
586 | | - |
| 586 | + |
587 | 587 | # Treat sectiontitle the same way as summary. |
588 | 588 | # Note that wpSectionTitle is not yet a part of the actual edit form, as wpSummary is |
589 | 589 | # currently doing double duty as both edit summary and section title. Right now this |
— | — | @@ -675,7 +675,7 @@ |
676 | 676 | $this->minoredit = false; |
677 | 677 | $this->watchthis = $request->getBool( 'watchthis', false ); // Watch may be overriden by request parameters |
678 | 678 | $this->recreate = false; |
679 | | - |
| 679 | + |
680 | 680 | // When creating a new section, we can preload a section title by passing it as the |
681 | 681 | // preloadtitle parameter in the URL (Bug 13100) |
682 | 682 | if ( $this->section == 'new' && $request->getVal( 'preloadtitle' ) ) { |
— | — | @@ -915,7 +915,7 @@ |
916 | 916 | if ( !empty( $this->mPreloadText ) ) { |
917 | 917 | return $this->mPreloadText; |
918 | 918 | } |
919 | | - |
| 919 | + |
920 | 920 | if ( $preload === '' ) { |
921 | 921 | return ''; |
922 | 922 | } |
— | — | @@ -1240,10 +1240,10 @@ |
1241 | 1241 | if ( $this->sectiontitle !== '' ) { |
1242 | 1242 | // Insert the section title above the content. |
1243 | 1243 | $text = wfMsgForContent( 'newsectionheaderdefaultlevel', $this->sectiontitle ) . "\n\n" . $text; |
1244 | | - |
| 1244 | + |
1245 | 1245 | // Jump to the new section |
1246 | 1246 | $result['sectionanchor'] = $wgParser->guessLegacySectionNameFromWikiText( $this->sectiontitle ); |
1247 | | - |
| 1247 | + |
1248 | 1248 | // If no edit summary was specified, create one automatically from the section |
1249 | 1249 | // title and have it link to the new section. Otherwise, respect the summary as |
1250 | 1250 | // passed. |
— | — | @@ -1254,7 +1254,7 @@ |
1255 | 1255 | } elseif ( $this->summary !== '' ) { |
1256 | 1256 | // Insert the section title above the content. |
1257 | 1257 | $text = wfMsgForContent( 'newsectionheaderdefaultlevel', $this->summary ) . "\n\n" . $text; |
1258 | | - |
| 1258 | + |
1259 | 1259 | // Jump to the new section |
1260 | 1260 | $result['sectionanchor'] = $wgParser->guessLegacySectionNameFromWikiText( $this->summary ); |
1261 | 1261 | |
— | — | @@ -1295,7 +1295,7 @@ |
1296 | 1296 | $this->isConflict = false; |
1297 | 1297 | } |
1298 | 1298 | } |
1299 | | - |
| 1299 | + |
1300 | 1300 | // If sectiontitle is set, use it, otherwise use the summary as the section title (for |
1301 | 1301 | // backwards compatibility with old forms/bots). |
1302 | 1302 | if ( $this->sectiontitle !== '' ) { |
— | — | @@ -1303,7 +1303,7 @@ |
1304 | 1304 | } else { |
1305 | 1305 | $sectionTitle = $this->summary; |
1306 | 1306 | } |
1307 | | - |
| 1307 | + |
1308 | 1308 | if ( $this->isConflict ) { |
1309 | 1309 | wfDebug( __METHOD__ . ": conflict! getting section '$this->section' for time '$this->edittime' (article time '{$timestamp}')\n" ); |
1310 | 1310 | $text = $this->mArticle->replaceSection( $this->section, $this->textbox1, $sectionTitle, $this->edittime ); |
— | — | @@ -1810,7 +1810,7 @@ |
1811 | 1811 | // (Bug 17416) |
1812 | 1812 | $this->autoSumm = 'd41d8cd98f00b204e9800998ecf8427e'; # == md5('') |
1813 | 1813 | } |
1814 | | - |
| 1814 | + |
1815 | 1815 | $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary ); |
1816 | 1816 | $wgOut->addHTML( Html::hidden( 'wpAutoSummary', $autosumm ) ); |
1817 | 1817 | |
— | — | @@ -2812,7 +2812,7 @@ |
2813 | 2813 | |
2814 | 2814 | $script .= Xml::encodeJsCall( 'mw.toolbar.addButton', $params ); |
2815 | 2815 | } |
2816 | | - |
| 2816 | + |
2817 | 2817 | // This used to be called on DOMReady from mediawiki.action.edit, which |
2818 | 2818 | // ended up causing race conditions with the setup code above. |
2819 | 2819 | $script .= "\n" . |
— | — | @@ -3018,7 +3018,7 @@ |
3019 | 3019 | */ |
3020 | 3020 | static function spamPage( $match = false ) { |
3021 | 3021 | wfDeprecated( __METHOD__, '1.17' ); |
3022 | | - |
| 3022 | + |
3023 | 3023 | global $wgOut, $wgTitle; |
3024 | 3024 | |
3025 | 3025 | $wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) ); |