* (Bug 16121) Add a note that a page move was without creating a redirect in the...
authorRaimond Spekking <raymond@users.mediawiki.org>
Tue, 30 Dec 2008 17:52:43 +0000 (17:52 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Tue, 30 Dec 2008 17:52:43 +0000 (17:52 +0000)
RELEASE-NOTES
includes/LogPage.php
includes/Title.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 234e5c9..d84aeed 100644 (file)
@@ -255,6 +255,8 @@ The following extensions are migrated into MediaWiki 1.14:
   |- class="unsortable"
 * (bug 16617) Add "talk" link to list of templates in edit mode
 * Show subversion too even if a "normal" version number is available
+* (bug 16121) Add a note that a page move was without creating a redirect in the
+  move log
 
 === Bug fixes in 1.14 ===
 
index 228c3fd..50a9a23 100644 (file)
@@ -210,6 +210,10 @@ class LogPage {
                                                if( $params[2] ) {
                                                        $details .= ' ['.wfMsg('protect-summary-cascade').']';
                                                }
+                                       } else if ( $type == 'move' && count( $params ) == 3 ) {
+                                               if( $params[2] ) {
+                                                       $details .= ' [' . wfMsg( 'move-redirect-suppressed' ) . ']';
+                                               }
                                        }
                                        $rv = wfMsgReal( $wgLogActions[$key], $params, true, !$skin ) . $details;
                                }
index e0b5f0d..122d5c2 100644 (file)
@@ -2691,10 +2691,12 @@ class Title {
                                        'pl_namespace' => $nt->getNamespace(),
                                        'pl_title'     => $nt->getDBkey() ),
                                $fname );
+                       $redirectSuppressed = false;
                } else {
                        $this->resetArticleID( 0 );
+                       $redirectSuppressed = true;
                }
-               
+
                # Move an image if this is a file
                if( $this->getNamespace() == NS_FILE ) {
                        $file = wfLocalFile( $this );
@@ -2709,7 +2711,7 @@ class Title {
 
                # Log the move
                $log = new LogPage( 'move' );
-               $log->addEntry( 'move_redir', $this, $reason, array( 1 => $nt->getPrefixedText() ) );
+               $log->addEntry( 'move_redir', $this, $reason, array( 1 => $nt->getPrefixedText(), 2 => $redirectSuppressed ) );
 
                # Purge squid
                if ( $wgUseSquid ) {
@@ -2786,10 +2788,12 @@ class Title {
                                        'pl_namespace' => $nt->getNamespace(),
                                        'pl_title'     => $nt->getDBkey() ),
                                $fname );
+                       $redirectSuppressed = false;
                } else {
                        $this->resetArticleID( 0 );
+                       $redirectSuppressed = true;
                }
-               
+
                # Move an image if this is a file
                if( $this->getNamespace() == NS_FILE ) {
                        $file = wfLocalFile( $this );
@@ -2804,7 +2808,7 @@ class Title {
 
                # Log the move
                $log = new LogPage( 'move' );
-               $log->addEntry( 'move', $this, $reason, array( 1 => $nt->getPrefixedText()) );
+               $log->addEntry( 'move', $this, $reason, array( 1 => $nt->getPrefixedText(), 2 => $redirectSuppressed ) );
 
                # Purge caches as per article creation
                Article::onArticleCreate( $nt );
index 3af1b6b..fc50cd0 100644 (file)
@@ -2753,6 +2753,7 @@ Please merge them manually.'''",
 'movepage-max-pages'           => 'The maximum of $1 {{PLURAL:$1|page|pages}} has been moved and no more will be moved automatically.',
 '1movedto2'                    => '[[$1]] moved to [[$2]]',
 '1movedto2_redir'              => '[[$1]] moved to [[$2]] over redirect',
+'move-redirect-suppressed'     => 'redirect suppressed',
 'movelogpage'                  => 'Move log',
 'movelogpagetext'              => 'Below is a list of pages moved.',
 'movereason'                   => 'Reason:',
index 2797e76..e582764 100644 (file)
@@ -1923,6 +1923,7 @@ $wgMessageStructure = array(
                'movepage-max-pages',
                '1movedto2',
                '1movedto2_redir',
+               'move-redirect-suppressed',
                'movelogpage',
                'movelogpagetext',
                'movereason',