r31329 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r31328‎ | r31329 | r31330 >
Date:22:40, 26 February 2008
Author:catrope
Status:old
Tags:
Comment:
(bug 13100) Added 'preloadtitle' parameter to action=edit&section=new that pre-fills the section title field. Patch by Mike Dillon
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -531,6 +531,9 @@
532532 $fname = 'EditPage::importFormData';
533533 wfProfileIn( $fname );
534534
 535+ # Section edit can come from either the form or a link
 536+ $this->section = $request->getVal( 'wpSection', $request->getVal( 'section' ) );
 537+
535538 if( $request->wasPosted() ) {
536539 # These fields need to be checked for encoding.
537540 # Also remove trailing whitespace, but don't remove _initial_
@@ -614,13 +617,14 @@
615618 $this->minoredit = false;
616619 $this->watchthis = false;
617620 $this->recreate = false;
 621+
 622+ if ( $this->section == 'new' && $request->getVal( 'preloadtitle' ) ) {
 623+ $this->summary = $request->getVal( 'preloadtitle' );
 624+ }
618625 }
619626
620627 $this->oldid = $request->getInt( 'oldid' );
621628
622 - # Section edit can come from either the form or a link
623 - $this->section = $request->getVal( 'wpSection', $request->getVal( 'section' ) );
624 -
625629 $this->live = $request->getCheck( 'live' );
626630 $this->editintro = $request->getText( 'editintro' );
627631
Index: trunk/phase3/RELEASE-NOTES
@@ -34,6 +34,8 @@
3535 confused when they are told they are range-blocked.
3636 * Add a new hook ImageBeforeProduceHTML to allow extensions to modify wikitext
3737 image syntax output.
 38+* (bug 13100) Added 'preloadtitle' parameter to action=edit&section=new that
 39+ pre-fills the section title field.
3840
3941 === Bug fixes in 1.13 ===
4042

Follow-up revisions

RevisionCommit summaryAuthorDate
r31419Fixing bug 13100 by removing a redundant line in EditPage::initialiseForm() (...catrope09:45, 1 March 2008

Status & tagging log