Follow-up r76434, r76570: Add skinname per CR
authorRaimond Spekking <raymond@users.mediawiki.org>
Sun, 14 Nov 2010 19:28:32 +0000 (19:28 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Sun, 14 Nov 2010 19:28:32 +0000 (19:28 +0000)
docs/hooks.txt
includes/Skin.php
skins/Modern.php

index d97718a..3ffce51 100644 (file)
@@ -1464,6 +1464,7 @@ $type: 'normal' or 'history' for old/diff views
 'SkinGetPoweredBy'
 &$text: additional 'powered by' icons in HTML.
 Note: Modern skin does not use the MediaWiki icon but plain text instead
+$skin: Name of the skin
 
 'SkinSubPageSubtitle': At the beginning of Skin::subPageSubtitle()
 &$subpages: Subpage links HTML
index 542f384..d0d1ba2 100644 (file)
@@ -1547,13 +1547,11 @@ class Skin extends Linker {
         * @return string
         */
        function getPoweredBy() {
-               global $wgStylePath;
+               global $wgStylePath, $wgUser;
 
                $url = htmlspecialchars( "$wgStylePath/common/images/poweredby_mediawiki_88x31.png" );
                $text = '<a href="http://www.mediawiki.org/"><img src="' . $url . '" height="31" width="88" alt="Powered by MediaWiki" /></a>';
-
-               wfRunHooks( 'SkinGetPoweredBy', array( &$text ) );
-
+               wfRunHooks( 'SkinGetPoweredBy', array( &$text, $wgUser->getSkin()->getSkinName() ) );   
                return $text;
        }
 
index f3605f7..6281985 100644 (file)
@@ -26,9 +26,9 @@ class SkinModern extends SkinTemplate {
         * skin L&F.
         */
        function getPoweredBy() {
-               global  $wgVersion;
+               global $wgVersion, $wgUser;
                $text = "<div class='mw_poweredby'>Powered by MediaWiki $wgVersion</div>";
-               wfRunHooks( 'SkinGetPoweredBy', array( &$text ) );
+               wfRunHooks( 'SkinGetPoweredBy', array( &$text, $wgUser->getSkin()->getSkinName() ) );
                return $text;
        }