r14488 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14487‎ | r14488 | r14489 >
Date:00:57, 31 May 2006
Author:robchurch
Status:old
Tags:
Comment:
(bug 5127) Auto edit summary when creating redirect page
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/languages/Messages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -576,6 +576,14 @@
577577 return false;
578578 }
579579
 580+ # If no edit comment was given when creating a new page, and what's being
 581+ # created is a redirect, be smart and fill in a neat auto-comment
 582+ if( $this->summary == '' ) {
 583+ $rt = Title::newFromRedirect( $this->textbox1 );
 584+ if( is_object( $rt ) )
 585+ $this->summary = wfMsgForContent( 'autoredircomment', $rt->getPrefixedText() );
 586+ }
 587+
580588 $isComment=($this->section=='new');
581589 $this->mArticle->insertNewArticle( $this->textbox1, $this->summary,
582590 $this->minoredit, $this->watchthis, false, $isComment);
Index: trunk/phase3/RELEASE-NOTES
@@ -385,6 +385,7 @@
386386 * Add /usr/local/bin to the diff3 search paths in the installer
387387 * (bug 6106) Update to Indonesian localisation (id) #17
388388 * (bug 6125) Add links to edit old versions to diff views
 389+* (bug 5127) Auto edit summary when creating redirect page
389390
390391 == Compatibility ==
391392
Index: trunk/phase3/languages/Messages.php
@@ -206,6 +206,7 @@
207207 'viewtalkpage' => 'View discussion',
208208 'otherlanguages' => 'In other languages',
209209 'redirectedfrom' => '(Redirected from $1)',
 210+'autoredircomment' => 'Redirecting to [[$1]]',
210211 'redirectpagesub' => 'Redirect page',
211212 'lastmodified' => 'This page was last modified $1.',
212213 'viewcount' => 'This page has been accessed {{plural:$1|one time|$1 times}}.',

Status & tagging log