Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -576,6 +576,14 @@ |
577 | 577 | return false; |
578 | 578 | } |
579 | 579 | |
| 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 | + |
580 | 588 | $isComment=($this->section=='new'); |
581 | 589 | $this->mArticle->insertNewArticle( $this->textbox1, $this->summary, |
582 | 590 | $this->minoredit, $this->watchthis, false, $isComment); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -385,6 +385,7 @@ |
386 | 386 | * Add /usr/local/bin to the diff3 search paths in the installer |
387 | 387 | * (bug 6106) Update to Indonesian localisation (id) #17 |
388 | 388 | * (bug 6125) Add links to edit old versions to diff views |
| 389 | +* (bug 5127) Auto edit summary when creating redirect page |
389 | 390 | |
390 | 391 | == Compatibility == |
391 | 392 | |
Index: trunk/phase3/languages/Messages.php |
— | — | @@ -206,6 +206,7 @@ |
207 | 207 | 'viewtalkpage' => 'View discussion', |
208 | 208 | 'otherlanguages' => 'In other languages', |
209 | 209 | 'redirectedfrom' => '(Redirected from $1)', |
| 210 | +'autoredircomment' => 'Redirecting to [[$1]]', |
210 | 211 | 'redirectpagesub' => 'Redirect page', |
211 | 212 | 'lastmodified' => 'This page was last modified $1.', |
212 | 213 | 'viewcount' => 'This page has been accessed {{plural:$1|one time|$1 times}}.', |