https://www.mediawiki.org/wiki/Special:Code/MediaWiki/108228
Revision: 108228
Author: cervidae
Date: 2012-01-06 12:46:27 +0000 (Fri, 06 Jan 2012)
Log Message:
-----------
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
trunk/extensions/BatchUserRights/BatchUserRights_body.php
trunk/extensions/HelpCommons/HelpCommons.php
Modified: trunk/extensions/BatchUserRights/BatchUserRights.php
===================================================================
--- trunk/extensions/BatchUserRights/BatchUserRights.php 2012-01-06
12:40:30 UTC (rev 108227)
+++ trunk/extensions/BatchUserRights/BatchUserRights.php 2012-01-06
12:46:27 UTC (rev 108228)
@@ -35,5 +35,5 @@
$dir = dirname( __FILE__ ) . '/';
$wgExtensionMessagesFiles['BatchUserRights'] = $dir .
'BatchUserRights.i18n.php';
$wgExtensionMessagesFiles['BatchUserRightsAliases'] = $dir .
'BatchUserRights.alias.php';
-$wgAutoloadClasses['BatchUserRights'] = $dir . 'BatchUserRights_body.php';
-$wgSpecialPages['BatchUserRights'] = 'BatchUserRights';
+$wgAutoloadClasses['SpecialBatchUserRights'] = $dir .
'BatchUserRights_body.php';
+$wgSpecialPages['BatchUserRights'] = 'SpecialBatchUserRights';
Modified: trunk/extensions/BatchUserRights/BatchUserRights_body.php
===================================================================
--- trunk/extensions/BatchUserRights/BatchUserRights_body.php 2012-01-06
12:40:30 UTC (rev 108227)
+++ trunk/extensions/BatchUserRights/BatchUserRights_body.php 2012-01-06
12:46:27 UTC (rev 108228)
@@ -5,7 +5,7 @@
* @file
* @ingroup SpecialPage
*/
-class BatchUserRights extends SpecialPage {
+class SpecialBatchUserRights extends SpecialPage {
protected $isself = false;
/**
Modified: trunk/extensions/HelpCommons/HelpCommons.php
===================================================================
--- trunk/extensions/HelpCommons/HelpCommons.php 2012-01-06 12:40:30 UTC
(rev 108227)
+++ trunk/extensions/HelpCommons/HelpCommons.php 2012-01-06 12:46:27 UTC
(rev 108228)
@@ -27,8 +27,7 @@
);
// Internationalization
-$dir = dirname( __FILE__ ) . '/';
-$wgExtensionMessagesFiles['HelpCommons'] = $dir . 'HelpCommons.i18n.php';
+$wgExtensionMessagesFiles['HelpCommons'] = dirname( __FILE__ ) .
'/HelpCommons.i18n.php';
// Help wiki(s) where the help namespace is fetched from
$wgHelpCommonsFetchingWikis = array();
@@ -92,7 +91,7 @@
if ( !empty( $text->old_text ) ) {
$wgOut->addWikiText( $text->old_text );
- $wgOut->addScript('<style type="text/css">div.noarticletext {
display: none; } div.mw-warning-with-logexcerpt { display: none; } #contentSub,
#contentSub2 { display: none; }</style>');
+ $wgOut->addScript( '<style type="text/css">div.noarticletext {
display: none; } div.mw-warning-with-logexcerpt { display: none; } #contentSub,
#contentSub2 { display: none; }</style>' );
return false;
} else {
return true;
@@ -197,6 +196,15 @@
function efHelpCommonsChangeCategoryLinks( $skin, $target, &$text,
&$customAttribs, &$query, &$options, &$ret ) {
global $wgTitle, $wgHelpCommonsFetchingWikis, $wgLanguageCode,
$wgDBname;
+ // only affects non-help-page-fetching wikis
+ foreach ( $wgHelpCommonsFetchingWikis as $language => $urls ) {
+ foreach ( $urls as $url => $helpwiki ) {
+ if ( $wgDBname == $helpwiki ) {
+ return true;
+ }
+ }
+ }
+
if ( $wgTitle->getNamespace() != NS_HELP || $wgTitle->exists() ) {
return true;
}
@@ -222,7 +230,7 @@
// change category's link
foreach ( $wgHelpCommonsFetchingWikis as $language => $urls ) {
foreach ( $urls as $url => $helpwiki ) {
- if ( $wgLanguageCode == $language && $wgDBname !=
$helpwiki ) {
+ if ( $wgLanguageCode == $language ) {
$text = '<a href="' . $url .
'/index.php?title=' . str_replace( ' ', '_', $target->getPrefixedText() ) .
'">' . $text . '</a>';
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs