r22947 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22946‎ | r22947 | r22948 >
Date:11:08, 13 June 2007
Author:raymond
Status:old
Tags:
Comment:
* (bug 8734) Different log message when article protection level is changed
Based on a patch of Max Semenik
* [[ ]] in protection log related messages removed as the page name is already linked.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/SpecialLog.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesDe.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesRu.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1158,6 +1158,7 @@
11591159 'protectlogpage',
11601160 'protectlogtext',
11611161 'protectedarticle',
 1162+ 'modifiedarticleprotection',
11621163 'unprotectedarticle',
11631164 'protectsub',
11641165 'confirmprotecttext',
Index: trunk/phase3/includes/Article.php
@@ -1699,7 +1699,13 @@
17001700 }
17011701
17021702 # Prepare a null revision to be added to the history
1703 - $comment = $wgContLang->ucfirst( wfMsgForContent( $protect ? 'protectedarticle' : 'unprotectedarticle', $this->mTitle->getPrefixedText() ) );
 1703+ $modified = $current != '' && $protect;
 1704+ if ( $protect ) {
 1705+ $comment_type = $modified ? 'modifiedarticleprotection' : 'protectedarticle';
 1706+ } else {
 1707+ $comment_type = 'unprotectedarticle';
 1708+ }
 1709+ $comment = $wgContLang->ucfirst( wfMsgForContent( $comment_type, $this->mTitle->getPrefixedText() ) );
17041710
17051711 foreach( $limit as $action => $restrictions ) {
17061712 # Check if the group level required to edit also can protect pages
@@ -1753,7 +1759,7 @@
17541760 $log = new LogPage( 'protect' );
17551761
17561762 if( $protect ) {
1757 - $log->addEntry( 'protect', $this->mTitle, trim( $reason . " [$updated]$cascade_description$expiry_description" ) );
 1763+ $log->addEntry( $modified ? 'modify' : 'protect', $this->mTitle, trim( $reason . " [$updated]$cascade_description$expiry_description" ) );
17581764 } else {
17591765 $log->addEntry( 'unprotect', $this->mTitle, $reason );
17601766 }
Index: trunk/phase3/includes/SpecialLog.php
@@ -384,7 +384,7 @@
385385 wfMsg( 'unblocklink' ),
386386 'action=unblock&ip=' . urlencode( $s->log_title ) ) . ')';
387387 // show change protection link
388 - } elseif ( $s->log_action == 'protect' && $wgUser->isAllowed( 'protect' ) ) {
 388+ } elseif ( ( $s->log_action == 'protect' || $s->log_action == 'modify' ) && $wgUser->isAllowed( 'protect' ) ) {
389389 $revert = '(' . $skin->makeKnownLink( $title->getPrefixedDBkey() ,
390390 wfMsg( 'protect_change' ),
391391 'action=unprotect' ) . ')';
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2219,6 +2219,7 @@
22202220 'block/block' => 'blocklogentry',
22212221 'block/unblock' => 'unblocklogentry',
22222222 'protect/protect' => 'protectedarticle',
 2223+ 'protect/modify' => 'modifiedarticleprotection',
22232224 'protect/unprotect' => 'unprotectedarticle',
22242225 'rights/rights' => 'rightslogentry',
22252226 'delete/delete' => 'deletedarticle',
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1812,8 +1812,9 @@
18131813 Please hit "back" and reload the page you came from, then try again.',
18141814 'protectlogpage' => 'Protection log',
18151815 '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.',
1816 -'protectedarticle' => 'protected "[[$1]]"',
1817 -'unprotectedarticle' => 'unprotected "[[$1]]"',
 1816+'protectedarticle' => 'protected "$1"',
 1817+'modifiedarticleprotection' => 'changed protection level for "$1"',
 1818+'unprotectedarticle' => 'unprotected "$1"',
18181819 'protectsub' => '(Protecting "$1")',
18191820 'confirmprotecttext' => 'Do you really want to protect this page?',
18201821 'confirmprotect' => 'Confirm protection',
Index: trunk/phase3/languages/messages/MessagesRu.php
@@ -1425,8 +1425,9 @@
14261426 Пожалуйста, нажмите кнопку «Назад» и перезагрузите страницу, с которой вы пришли.',
14271427 'protectlogpage' => 'Журнал защиты',
14281428 'protectlogtext' => 'Ниже приведён журнал установок и снятий защиты со статей. Вы можете также просмотреть [[{{ns:special}}:Protectedpages|список страниц, которые в данный момент защищены]].',
1429 -'protectedarticle' => 'защищена страница «[[$1]]»',
1430 -'unprotectedarticle' => 'снята защита со страницы «[[$1]]»',
 1429+'protectedarticle' => 'защищена страница «$1»',
 1430+'modifiedarticleprotection' => 'изменён уровень защиты страницы «$1»',
 1431+'unprotectedarticle' => 'снята защита со страницы «$1»',
14311432 'protectsub' => '(Установка защиты для «$1»)',
14321433 'confirmprotecttext' => 'Вы действительно хотите установить защиту этой страницы?',
14331434 'confirmprotect' => 'Подтвердите установку защиты страницы',
Index: trunk/phase3/languages/messages/MessagesDe.php
@@ -1420,8 +1420,9 @@
14211421 Bitte gehen Sie zurück und versuchen den Vorgang erneut auszuführen.',
14221422 'protectlogpage' => 'Seitenschutz-Logbuch',
14231423 'protectlogtext' => 'Dies ist das Seitenschutz-Logbuch. Siehe die [[{{ns:special}}:Protectedpages|Liste der geschützten Seiten]] für alle aktuell geschützten Seiten.',
1424 -'protectedarticle' => 'änderte den Seitenschutzstatus von [[$1]]',
1425 -'unprotectedarticle' => 'hob den Schutz von $1 auf',
 1424+'protectedarticle' => 'schützte „$1“',
 1425+'modifiedarticleprotection' => 'änderte den Schutz von „$1“',
 1426+'unprotectedarticle' => 'hob den Schutz von „$1“ auf',
14261427 'protectsub' => '(Schutz ändern von „$1“)',
14271428 'confirmprotecttext' => 'Soll diese Seite wirklich geschützt werden?',
14281429 'confirmprotect' => 'Seitenschutzstatus ändern',
Index: trunk/phase3/RELEASE-NOTES
@@ -81,6 +81,7 @@
8282 pre-Monobook skins. As always, modifications should go in-wiki to MediaWiki:
8383 Common.css and MediaWiki:Monobook.css.
8484 * (bug 8869) Introduce Special:Uncategorizedtemplates
 85+* (bug 8734) Different log message when article protection level is changed
8586
8687 == Bugfixes since 1.10 ==
8788
@@ -153,9 +154,6 @@
154155 * (bug 9383) Don't set a default value for BLOB column in rc-deleted
155156 database patch
156157 * (bug 10149) Don't show full template list on section-0 edit
157 -* Fix maintenance/importImages.php so it doesn't barf PHP errors when no
158 - suitable files are found, and make the list of extensions an option (defaults
159 - to $wgFileExtensions)
160158 * (bug 9909) Ensure access to binary fields in the math table use encodeBlob()
161159 and decodeBlob()
162160 * (bug 6743) Don't link broken image links to the upload form when uploads
@@ -201,6 +199,9 @@
202200
203201 * Add support for wgMaxTocLevel option in parserTests
204202 * (bug 6823) Disable article view counter in maintenance/dumpHTML.php
 203+* Fix maintenance/importImages.php so it doesn't barf PHP errors when no
 204+ suitable files are found, and make the list of extensions an option (defaults
 205+ to $wgFileExtensions)
205206
206207 == Languages updated since 1.10 ==
207208
@@ -308,4 +309,4 @@
309310
310311 === IRC help ===
311312
312 -There's usually someone online in #mediawiki on irc.freenode.net
\ No newline at end of file
 313+There's usually someone online in #mediawiki on irc.freenode.net

Follow-up revisions

RevisionCommit summaryAuthorDate
r22950Reinstate some more [[ ]], removed in r22947 but needed by loglines of recent...raymond12:30, 13 June 2007
r22967Merged revisions 22935-22966 via svnmerge from...david18:35, 13 June 2007

Status & tagging log