r111221 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111220‎ | r111221 | r111222 >
Date:00:41, 11 February 2012
Author:aaron
Status:ok
Tags:
Comment:
Reverted r111188: backport conflict fodder
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -37,7 +37,7 @@
3838 const AS_HOOK_ERROR = 210;
3939
4040 /**
41 - * Status: The filter function set in $wgFilterCallback returned true (= block it)
 41+ * Status: The filter function set in $wgFilterCallback returned true (= block it)
4242 */
4343 const AS_FILTERING = 211;
4444
@@ -182,7 +182,7 @@
183183 * @var ParserOutput
184184 */
185185 var $mParserOutput;
186 -
 186+
187187 /**
188188 * Has a summary been preset using GET parameter &summary= ?
189189 * @var Bool
@@ -475,7 +475,7 @@
476476 */
477477 function readOnlyPage( $source = null, $protected = false, $reasons = array(), $action = null ) {
478478 wfDeprecated( __METHOD__, '1.19' );
479 -
 479+
480480 global $wgRequest, $wgOut;
481481 if ( $wgRequest->getBool( 'redlink' ) ) {
482482 // The edit page was reached via a red link.
@@ -582,7 +582,7 @@
583583 # header syntax, e.g. 'Foobar'. This is mainly an issue when we are using wpSummary for
584584 # section titles.
585585 $this->summary = preg_replace( '/^\s*=+\s*(.*?)\s*=+\s*$/', '$1', $this->summary );
586 -
 586+
587587 # Treat sectiontitle the same way as summary.
588588 # Note that wpSectionTitle is not yet a part of the actual edit form, as wpSummary is
589589 # currently doing double duty as both edit summary and section title. Right now this
@@ -675,7 +675,7 @@
676676 $this->minoredit = false;
677677 $this->watchthis = $request->getBool( 'watchthis', false ); // Watch may be overriden by request parameters
678678 $this->recreate = false;
679 -
 679+
680680 // When creating a new section, we can preload a section title by passing it as the
681681 // preloadtitle parameter in the URL (Bug 13100)
682682 if ( $this->section == 'new' && $request->getVal( 'preloadtitle' ) ) {
@@ -915,7 +915,7 @@
916916 if ( !empty( $this->mPreloadText ) ) {
917917 return $this->mPreloadText;
918918 }
919 -
 919+
920920 if ( $preload === '' ) {
921921 return '';
922922 }
@@ -1240,10 +1240,10 @@
12411241 if ( $this->sectiontitle !== '' ) {
12421242 // Insert the section title above the content.
12431243 $text = wfMsgForContent( 'newsectionheaderdefaultlevel', $this->sectiontitle ) . "\n\n" . $text;
1244 -
 1244+
12451245 // Jump to the new section
12461246 $result['sectionanchor'] = $wgParser->guessLegacySectionNameFromWikiText( $this->sectiontitle );
1247 -
 1247+
12481248 // If no edit summary was specified, create one automatically from the section
12491249 // title and have it link to the new section. Otherwise, respect the summary as
12501250 // passed.
@@ -1254,7 +1254,7 @@
12551255 } elseif ( $this->summary !== '' ) {
12561256 // Insert the section title above the content.
12571257 $text = wfMsgForContent( 'newsectionheaderdefaultlevel', $this->summary ) . "\n\n" . $text;
1258 -
 1258+
12591259 // Jump to the new section
12601260 $result['sectionanchor'] = $wgParser->guessLegacySectionNameFromWikiText( $this->summary );
12611261
@@ -1295,7 +1295,7 @@
12961296 $this->isConflict = false;
12971297 }
12981298 }
1299 -
 1299+
13001300 // If sectiontitle is set, use it, otherwise use the summary as the section title (for
13011301 // backwards compatibility with old forms/bots).
13021302 if ( $this->sectiontitle !== '' ) {
@@ -1303,7 +1303,7 @@
13041304 } else {
13051305 $sectionTitle = $this->summary;
13061306 }
1307 -
 1307+
13081308 if ( $this->isConflict ) {
13091309 wfDebug( __METHOD__ . ": conflict! getting section '$this->section' for time '$this->edittime' (article time '{$timestamp}')\n" );
13101310 $text = $this->mArticle->replaceSection( $this->section, $this->textbox1, $sectionTitle, $this->edittime );
@@ -1810,7 +1810,7 @@
18111811 // (Bug 17416)
18121812 $this->autoSumm = 'd41d8cd98f00b204e9800998ecf8427e'; # == md5('')
18131813 }
1814 -
 1814+
18151815 $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary );
18161816 $wgOut->addHTML( Html::hidden( 'wpAutoSummary', $autosumm ) );
18171817
@@ -2813,7 +2813,7 @@
28142814
28152815 $script .= Xml::encodeJsCall( 'mw.toolbar.addButton', $params );
28162816 }
2817 -
 2817+
28182818 // This used to be called on DOMReady from mediawiki.action.edit, which
28192819 // ended up causing race conditions with the setup code above.
28202820 $script .= "\n" .
@@ -3019,7 +3019,7 @@
30203020 */
30213021 static function spamPage( $match = false ) {
30223022 wfDeprecated( __METHOD__, '1.17' );
3023 -
 3023+
30243024 global $wgOut, $wgTitle;
30253025
30263026 $wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111188w/smah19:34, 10 February 2012

Status & tagging log