Mwjames has uploaded a new change for review. https://gerrit.wikimedia.org/r/60384
Change subject: SMWHooks::addPoweredBySMW clean-up ...................................................................... SMWHooks::addPoweredBySMW clean-up + Remove addPoweredBySMW hook because it is not being used, the icon is set by $wgFooterIcons [1] + Use https instead of http url [1] http://www.mediawiki.org/wiki/Manual:$wgFooterIcons Change-Id: Ib7cdbac0ec940013c298a77f3759d8c83080125e --- M SemanticMediaWiki.hooks.php M SemanticMediaWiki.php M includes/Setup.php 3 files changed, 4 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/84/60384/1 diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php index 501bc27..8dc4fd6 100644 --- a/SemanticMediaWiki.hooks.php +++ b/SemanticMediaWiki.hooks.php @@ -136,28 +136,6 @@ } /** - * Adds the 'Powered by Semantic MediaWiki' button right next to the default - * 'Powered by MediaWiki' button at the bottom of every page. This works - * only with MediaWiki 1.17+. - * It might make sense to make this configurable via a variable, if some - * admins don't want it. - * - * @since 1.7 - * - * @param string $text - * @param Skin $skin - * - * @return boolean - */ - public static function addPoweredBySMW( &$text, $skin ) { - global $smwgScriptPath; - $url = htmlspecialchars( "$smwgScriptPath/resources/images/smw_button.png" ); - $text .= ' <a href="http://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki"><img src="' . $url . '" alt="Powered by Semantic MediaWiki" /></a>'; - - return true; - } - - /** * Adds the 'semantic' extension type to the type list. * * @since 1.7.1 diff --git a/SemanticMediaWiki.php b/SemanticMediaWiki.php index 16a9a2e..b51f532 100644 --- a/SemanticMediaWiki.php +++ b/SemanticMediaWiki.php @@ -102,9 +102,10 @@ $wgAPIModules['ask'] = 'ApiAsk'; $wgAPIModules['askargs'] = 'ApiAskArgs'; +// Adds a poweredby footer icon $wgFooterIcons['poweredby']['semanticmediawiki'] = array( - 'src' => null, - 'url' => 'http://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki', + 'src' => $GLOBALS['smwgScriptPath'] . '/resources/images/smw_button.png', + 'url' => 'https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki', 'alt' => 'Powered by Semantic MediaWiki', ); diff --git a/includes/Setup.php b/includes/Setup.php index d1ba54c..3354267 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -100,7 +100,6 @@ } $wgHooks['SkinAfterContent'][] = 'SMWFactbox::onSkinAfterContent'; // draw Factbox below categories - $wgHooks['SkinGetPoweredBy'][] = 'SMWHooks::addPoweredBySMW'; $wgHooks['ExtensionTypes'][] = 'SMWHooks::addSemanticExtensionType'; } @@ -408,16 +407,10 @@ */ function smwfSetupExtension() { wfProfileIn( 'smwfSetupExtension (SMW)' ); - global $smwgScriptPath, $wgFooterIcons, $smwgMasterStore, $smwgIQRunningNumber; + global $smwgScriptPath, $smwgMasterStore, $smwgIQRunningNumber; $smwgMasterStore = null; $smwgIQRunningNumber = 0; - - if ( isset( $wgFooterIcons['poweredby'] ) - && isset( $wgFooterIcons['poweredby']['semanticmediawiki'] ) - && is_null( $wgFooterIcons['poweredby']['semanticmediawiki']['src'] ) ) { - $wgFooterIcons['poweredby']['semanticmediawiki']['src'] = "$smwgScriptPath/resources/images/smw_button.png"; - } wfProfileOut( 'smwfSetupExtension (SMW)' ); return true; -- To view, visit https://gerrit.wikimedia.org/r/60384 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7cdbac0ec940013c298a77f3759d8c83080125e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticMediaWiki Gerrit-Branch: master Gerrit-Owner: Mwjames <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
