r90461 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90460‎ | r90461 | r90462 >
Date:13:57, 20 June 2011
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
Expand return documentation for r84357
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -5162,6 +5162,8 @@
51635163 * @param $newText String: replacement text for section data.
51645164 * @return String: for "get", the extracted section text.
51655165 * for "replace", the whole page with the section replaced.
 5166+ * If the page is empty and section 0 is requested, $text (as '')
 5167+ * is returned
51665168 */
51675169 private function extractSections( $text, $section, $mode, $newText='' ) {
51685170 global $wgTitle; # not generally used but removes an ugly failure mode

Follow-up revisions

RevisionCommit summaryAuthorDate
r96271Reverted r84357 and r90461 and fixed the bug in a better way: in an empty doc...tstarling06:56, 5 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84357* (Bug 14005) editing section 0 of an existing but empty page gives no such s...reedy23:23, 19 March 2011

Comments

#Comment by Aaron Schulz (talk | contribs)   21:24, 27 June 2011

Why not keep the old desired behavior? If in *get* mode return $newText (since you didn't find the section) and if in *replace* mode then return $text.

#Comment by Reedy (talk | contribs)   21:24, 27 June 2011

I just applied the patch

#Comment by Tim Starling (talk | contribs)   06:07, 5 September 2011

That's no excuse.

Status & tagging log