r45192 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45191‎ | r45192 | r45193 >
Date:17:52, 30 December 2008
Author:raymond
Status:ok
Tags:
Comment:
* (Bug 16121) Add a note that a page move was without creating a redirect in the move log
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/LogPage.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1923,6 +1923,7 @@
19241924 'movepage-max-pages',
19251925 '1movedto2',
19261926 '1movedto2_redir',
 1927+ 'move-redirect-suppressed',
19271928 'movelogpage',
19281929 'movelogpagetext',
19291930 'movereason',
Index: trunk/phase3/includes/Title.php
@@ -2691,10 +2691,12 @@
26922692 'pl_namespace' => $nt->getNamespace(),
26932693 'pl_title' => $nt->getDBkey() ),
26942694 $fname );
 2695+ $redirectSuppressed = false;
26952696 } else {
26962697 $this->resetArticleID( 0 );
 2698+ $redirectSuppressed = true;
26972699 }
2698 -
 2700+
26992701 # Move an image if this is a file
27002702 if( $this->getNamespace() == NS_FILE ) {
27012703 $file = wfLocalFile( $this );
@@ -2709,7 +2711,7 @@
27102712
27112713 # Log the move
27122714 $log = new LogPage( 'move' );
2713 - $log->addEntry( 'move_redir', $this, $reason, array( 1 => $nt->getPrefixedText() ) );
 2715+ $log->addEntry( 'move_redir', $this, $reason, array( 1 => $nt->getPrefixedText(), 2 => $redirectSuppressed ) );
27142716
27152717 # Purge squid
27162718 if ( $wgUseSquid ) {
@@ -2786,10 +2788,12 @@
27872789 'pl_namespace' => $nt->getNamespace(),
27882790 'pl_title' => $nt->getDBkey() ),
27892791 $fname );
 2792+ $redirectSuppressed = false;
27902793 } else {
27912794 $this->resetArticleID( 0 );
 2795+ $redirectSuppressed = true;
27922796 }
2793 -
 2797+
27942798 # Move an image if this is a file
27952799 if( $this->getNamespace() == NS_FILE ) {
27962800 $file = wfLocalFile( $this );
@@ -2804,7 +2808,7 @@
28052809
28062810 # Log the move
28072811 $log = new LogPage( 'move' );
2808 - $log->addEntry( 'move', $this, $reason, array( 1 => $nt->getPrefixedText()) );
 2812+ $log->addEntry( 'move', $this, $reason, array( 1 => $nt->getPrefixedText(), 2 => $redirectSuppressed ) );
28092813
28102814 # Purge caches as per article creation
28112815 Article::onArticleCreate( $nt );
Index: trunk/phase3/includes/LogPage.php
@@ -210,6 +210,10 @@
211211 if( $params[2] ) {
212212 $details .= ' ['.wfMsg('protect-summary-cascade').']';
213213 }
 214+ } else if ( $type == 'move' && count( $params ) == 3 ) {
 215+ if( $params[2] ) {
 216+ $details .= ' [' . wfMsg( 'move-redirect-suppressed' ) . ']';
 217+ }
214218 }
215219 $rv = wfMsgReal( $wgLogActions[$key], $params, true, !$skin ) . $details;
216220 }
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2753,6 +2753,7 @@
27542754 'movepage-max-pages' => 'The maximum of $1 {{PLURAL:$1|page|pages}} has been moved and no more will be moved automatically.',
27552755 '1movedto2' => '[[$1]] moved to [[$2]]',
27562756 '1movedto2_redir' => '[[$1]] moved to [[$2]] over redirect',
 2757+'move-redirect-suppressed' => 'redirect suppressed',
27572758 'movelogpage' => 'Move log',
27582759 'movelogpagetext' => 'Below is a list of pages moved.',
27592760 'movereason' => 'Reason:',
Index: trunk/phase3/RELEASE-NOTES
@@ -255,6 +255,8 @@
256256 |- class="unsortable"
257257 * (bug 16617) Add "talk" link to list of templates in edit mode
258258 * Show subversion too even if a "normal" version number is available
 259+* (bug 16121) Add a note that a page move was without creating a redirect in the
 260+ move log
259261
260262 === Bug fixes in 1.14 ===
261263

Status & tagging log