* (bug 8734) Different log message when article protection level is changed
authorRaimond Spekking <raymond@users.mediawiki.org>
Wed, 13 Jun 2007 11:08:57 +0000 (11:08 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Wed, 13 Jun 2007 11:08:57 +0000 (11:08 +0000)
  Based on a patch of Max Semenik
* [[ ]] in protection log related messages removed as the page name is already linked.

RELEASE-NOTES
includes/Article.php
includes/DefaultSettings.php
includes/SpecialLog.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
languages/messages/MessagesRu.php
maintenance/language/messages.inc

index 1057de1..a10c2b9 100644 (file)
@@ -81,6 +81,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   pre-Monobook skins.  As always, modifications should go in-wiki to MediaWiki:
   Common.css and MediaWiki:Monobook.css.
 * (bug 8869) Introduce Special:Uncategorizedtemplates
+* (bug 8734) Different log message when article protection level is changed
 
 == Bugfixes since 1.10 ==
 
@@ -153,9 +154,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 9383) Don't set a default value for BLOB column in rc-deleted
   database patch
 * (bug 10149) Don't show full template list on section-0 edit
-* Fix maintenance/importImages.php so it doesn't barf PHP errors when no
-  suitable files are found, and make the list of extensions an option (defaults
-  to $wgFileExtensions)
 * (bug 9909) Ensure access to binary fields in the math table use encodeBlob() 
   and decodeBlob()
 * (bug 6743) Don't link broken image links to the upload form when uploads
@@ -201,6 +199,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 
 * Add support for wgMaxTocLevel option in parserTests
 * (bug 6823) Disable article view counter in maintenance/dumpHTML.php
+* Fix maintenance/importImages.php so it doesn't barf PHP errors when no
+  suitable files are found, and make the list of extensions an option (defaults
+  to $wgFileExtensions)
 
 == Languages updated since 1.10 ==
 
@@ -308,4 +309,4 @@ going to run a public MediaWiki, so you can be notified of security fixes.
 
 === IRC help ===
 
-There's usually someone online in #mediawiki on irc.freenode.net
\ No newline at end of file
+There's usually someone online in #mediawiki on irc.freenode.net
index 6e7f779..0efa3ea 100644 (file)
@@ -1699,7 +1699,13 @@ class Article {
                                }
 
                                # Prepare a null revision to be added to the history
-                               $comment = $wgContLang->ucfirst( wfMsgForContent( $protect ? 'protectedarticle' : 'unprotectedarticle', $this->mTitle->getPrefixedText() ) );
+                               $modified = $current != '' && $protect;
+                               if ( $protect ) {
+                                       $comment_type = $modified ? 'modifiedarticleprotection' : 'protectedarticle';
+                               } else {
+                                       $comment_type = 'unprotectedarticle';
+                               }
+                               $comment = $wgContLang->ucfirst( wfMsgForContent( $comment_type, $this->mTitle->getPrefixedText() ) );
 
                                foreach( $limit as $action => $restrictions ) {
                                        # Check if the group level required to edit also can protect pages
@@ -1753,7 +1759,7 @@ class Article {
                                $log = new LogPage( 'protect' );
 
                                if( $protect ) {
-                                       $log->addEntry( 'protect', $this->mTitle, trim( $reason . " [$updated]$cascade_description$expiry_description" ) );
+                                       $log->addEntry( $modified ? 'modify' : 'protect', $this->mTitle, trim( $reason . " [$updated]$cascade_description$expiry_description" ) );
                                } else {
                                        $log->addEntry( 'unprotect', $this->mTitle, $reason );
                                }
index 564f82d..b25a50e 100644 (file)
@@ -2219,6 +2219,7 @@ $wgLogActions = array(
        'block/block'       => 'blocklogentry',
        'block/unblock'     => 'unblocklogentry',
        'protect/protect'   => 'protectedarticle',
+       'protect/modify'    => 'modifiedarticleprotection',
        'protect/unprotect' => 'unprotectedarticle',
        'rights/rights'     => 'rightslogentry',
        'delete/delete'     => 'deletedarticle',
index 2fcce66..f2400fe 100644 (file)
@@ -384,7 +384,7 @@ class LogViewer {
                                wfMsg( 'unblocklink' ),
                                'action=unblock&ip=' . urlencode( $s->log_title ) ) . ')';
                // show change protection link
-               } elseif ( $s->log_action == 'protect' && $wgUser->isAllowed( 'protect' ) ) {
+               } elseif ( ( $s->log_action == 'protect' || $s->log_action == 'modify' ) && $wgUser->isAllowed( 'protect' ) ) {
                        $revert = '(' .  $skin->makeKnownLink( $title->getPrefixedDBkey() ,
                                wfMsg( 'protect_change' ),
                                'action=unprotect' ) . ')';
index 5e2a6ad..2a7837b 100644 (file)
@@ -1420,8 +1420,9 @@ Diese Aktion wurde aus Sicherheitsgründen abgebrochen, um eine falsche Zuordnun
 Bitte gehen Sie zurück und versuchen den Vorgang erneut auszuführen.',
 'protectlogpage'              => 'Seitenschutz-Logbuch',
 'protectlogtext'              => 'Dies ist das Seitenschutz-Logbuch. Siehe die [[{{ns:special}}:Protectedpages|Liste der geschützten Seiten]] für alle aktuell geschützten Seiten.',
-'protectedarticle'            => 'änderte den Seitenschutzstatus von [[$1]]',
-'unprotectedarticle'          => 'hob den Schutz von $1 auf',
+'protectedarticle'            => 'schützte „$1“',
+'modifiedarticleprotection'   => 'änderte den Schutz von „$1“',
+'unprotectedarticle'          => 'hob den Schutz von „$1“ auf',
 'protectsub'                  => '(Schutz ändern von „$1“)',
 'confirmprotecttext'          => 'Soll diese Seite wirklich geschützt werden?',
 'confirmprotect'              => 'Seitenschutzstatus ändern',
index f5b60ec..e61b46c 100644 (file)
@@ -1812,8 +1812,9 @@ this action has been canceled as a precaution against session hijacking.
 Please hit "back" and reload the page you came from, then try again.',
 'protectlogpage'              => 'Protection log',
 'protectlogtext'              => 'Below is a list of page locks and unlocks. See the [[Special:Protectedpages|protected pages list]] for the list of currently operational page protections.',
-'protectedarticle'            => 'protected "[[$1]]"',
-'unprotectedarticle'          => 'unprotected "[[$1]]"',
+'protectedarticle'            => 'protected "$1"',
+'modifiedarticleprotection'   => 'changed protection level for "$1"',
+'unprotectedarticle'          => 'unprotected "$1"',
 'protectsub'                  => '(Protecting "$1")',
 'confirmprotecttext'          => 'Do you really want to protect this page?',
 'confirmprotect'              => 'Confirm protection',
index 3bb0992..04e3951 100644 (file)
@@ -1425,8 +1425,9 @@ $NEWPAGE
 Пожалуйста, нажмите кнопку «Назад» и перезагрузите страницу, с которой вы пришли.',
 'protectlogpage'              => 'Журнал защиты',
 'protectlogtext'              => 'Ниже приведён журнал установок и снятий защиты со статей. Вы можете также просмотреть [[{{ns:special}}:Protectedpages|список страниц, которые в данный момент защищены]].',
-'protectedarticle'            => 'защищена страница «[[$1]]»',
-'unprotectedarticle'          => 'снята защита со страницы «[[$1]]»',
+'protectedarticle'            => 'защищена страница «$1»',
+'modifiedarticleprotection'   => 'изменён уровень защиты страницы «$1»',
+'unprotectedarticle'          => 'снята защита со страницы «$1»',
 'protectsub'                  => '(Установка защиты для «$1»)',
 'confirmprotecttext'          => 'Вы действительно хотите установить защиту этой страницы?',
 'confirmprotect'              => 'Подтвердите установку защиты страницы',
index c6fbec4..364c797 100644 (file)
@@ -1158,6 +1158,7 @@ $wgMessageStructure = array(
                'protectlogpage',
                'protectlogtext',
                'protectedarticle',
+               'modifiedarticleprotection',
                'unprotectedarticle',
                'protectsub',
                'confirmprotecttext',