Some protection move log cleanup (bug 15754)
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 29 Sep 2008 13:25:35 +0000 (13:25 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 29 Sep 2008 13:25:35 +0000 (13:25 +0000)
includes/DefaultSettings.php
includes/Title.php
languages/messages/MessagesEn.php

index 85602dd..f331d91 100644 (file)
@@ -2736,6 +2736,7 @@ $wgLogActions = array(
        'protect/protect'   => 'protectedarticle',
        'protect/modify'    => 'modifiedarticleprotection',
        'protect/unprotect' => 'unprotectedarticle',
+       'protect/move_prot' => 'movedarticleprotection',
        'rights/rights'     => 'rightslogentry',
        'delete/delete'     => 'deletedarticle',
        'delete/restore'    => 'undeletedarticle',
index d3ed526..80ebdb1 100644 (file)
@@ -2543,8 +2543,9 @@ class Title {
                        );
                        # Update the protection log
                        $log = new LogPage( 'protect' );
-                       $comment = wfMsgForContent('1movedto2',$this->getPrefixedText(), $nt->getPrefixedText() );
-                       $log->addEntry( 'protect', $nt, $comment, array() ); // FIXME: $params?
+                       $comment = wfMsgForContent('prot_1movedto2',$this->getPrefixedText(), $nt->getPrefixedText() );
+                       if( $reason ) $comment .= ': ' . $reason;
+                       $log->addEntry( 'move_prot', $nt, $comment, array($this->getPrefixedText()) ); // FIXME: $params?
                }
 
                # Update watchlists
index ed95b54..4a36065 100644 (file)
@@ -2356,6 +2356,8 @@ See the [[Special:ProtectedPages|protected pages list]] for the list of currentl
 'protectedarticle'            => 'protected "[[$1]]"',
 'modifiedarticleprotection'   => 'changed protection level for "[[$1]]"',
 'unprotectedarticle'          => 'unprotected "[[$1]]"',
+'movedarticleprotection'      => 'moved protection settings from "[[$2]]" to "[[$1]]"',
+'prot_1movedto2'              => '[[$1]] moved to [[$2]]',
 'protect-title'               => 'Change protection level for "$1"',
 'protect-backlink'            => '← $1', # only translate this message to other languages if you have to change it
 'protect-legend'              => 'Confirm protection',