r108228 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108227‎ | r108228 | r108229 >
Date:12:46, 6 January 2012
Author:cervidae
Status:deferred (Comments)
Tags:
Comment:
r107413: Changing BatchUserRights' class from 'BatchUserRights' to 'SpecialBatchUserRights' again
HelpCommons: Only make category links blue in non-help-fetching wikis. Made them blue in previews of nonexistent pages in help-fetching wikis
Modified paths:
  • /trunk/extensions/BatchUserRights/BatchUserRights.php (modified) (history)
  • /trunk/extensions/BatchUserRights/BatchUserRights_body.php (modified) (history)
  • /trunk/extensions/HelpCommons/HelpCommons.php (modified) (history)

Diff [purge]

Index: trunk/extensions/HelpCommons/HelpCommons.php
@@ -27,8 +27,7 @@
2828 );
2929
3030 // Internationalization
31 -$dir = dirname( __FILE__ ) . '/';
32 -$wgExtensionMessagesFiles['HelpCommons'] = $dir . 'HelpCommons.i18n.php';
 31+$wgExtensionMessagesFiles['HelpCommons'] = dirname( __FILE__ ) . '/HelpCommons.i18n.php';
3332
3433 // Help wiki(s) where the help namespace is fetched from
3534 $wgHelpCommonsFetchingWikis = array();
@@ -92,7 +91,7 @@
9392
9493 if ( !empty( $text->old_text ) ) {
9594 $wgOut->addWikiText( $text->old_text );
96 - $wgOut->addScript('<style type="text/css">div.noarticletext { display: none; } div.mw-warning-with-logexcerpt { display: none; } #contentSub, #contentSub2 { display: none; }</style>');
 95+ $wgOut->addScript( '<style type="text/css">div.noarticletext { display: none; } div.mw-warning-with-logexcerpt { display: none; } #contentSub, #contentSub2 { display: none; }</style>' );
9796 return false;
9897 } else {
9998 return true;
@@ -197,6 +196,15 @@
198197 function efHelpCommonsChangeCategoryLinks( $skin, $target, &$text, &$customAttribs, &$query, &$options, &$ret ) {
199198 global $wgTitle, $wgHelpCommonsFetchingWikis, $wgLanguageCode, $wgDBname;
200199
 200+ // only affects non-help-page-fetching wikis
 201+ foreach ( $wgHelpCommonsFetchingWikis as $language => $urls ) {
 202+ foreach ( $urls as $url => $helpwiki ) {
 203+ if ( $wgDBname == $helpwiki ) {
 204+ return true;
 205+ }
 206+ }
 207+ }
 208+
201209 if ( $wgTitle->getNamespace() != NS_HELP || $wgTitle->exists() ) {
202210 return true;
203211 }
@@ -222,7 +230,7 @@
223231 // change category's link
224232 foreach ( $wgHelpCommonsFetchingWikis as $language => $urls ) {
225233 foreach ( $urls as $url => $helpwiki ) {
226 - if ( $wgLanguageCode == $language && $wgDBname != $helpwiki ) {
 234+ if ( $wgLanguageCode == $language ) {
227235 $text = '<a href="' . $url . '/index.php?title=' . str_replace( ' ', '_', $target->getPrefixedText() ) . '">' . $text . '</a>';
228236 }
229237 }
Index: trunk/extensions/BatchUserRights/BatchUserRights_body.php
@@ -5,7 +5,7 @@
66 * @file
77 * @ingroup SpecialPage
88 */
9 -class BatchUserRights extends SpecialPage {
 9+class SpecialBatchUserRights extends SpecialPage {
1010 protected $isself = false;
1111
1212 /**
Index: trunk/extensions/BatchUserRights/BatchUserRights.php
@@ -35,5 +35,5 @@
3636 $dir = dirname( __FILE__ ) . '/';
3737 $wgExtensionMessagesFiles['BatchUserRights'] = $dir . 'BatchUserRights.i18n.php';
3838 $wgExtensionMessagesFiles['BatchUserRightsAliases'] = $dir . 'BatchUserRights.alias.php';
39 -$wgAutoloadClasses['BatchUserRights'] = $dir . 'BatchUserRights_body.php';
40 -$wgSpecialPages['BatchUserRights'] = 'BatchUserRights';
 39+$wgAutoloadClasses['SpecialBatchUserRights'] = $dir . 'BatchUserRights_body.php';
 40+$wgSpecialPages['BatchUserRights'] = 'SpecialBatchUserRights';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107413r106556 reverts:...cervidae20:25, 27 December 2011

Comments

#Comment by SVG (talk | contribs)   12:40, 20 January 2012

Only r107413 was reverted. Not this action. I've changed the status to deferred and removed the follow-up r109592.

Status & tagging log