r76669 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76668‎ | r76669 | r76670 >
Date:19:45, 14 November 2010
Author:raymond
Status:ok
Tags:
Comment:
Follow-up r76434, r76570,r76668: Pass skin object per CR
Modified paths:
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/skins/Modern.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Modern.php
@@ -26,9 +26,9 @@
2727 * skin L&F.
2828 */
2929 function getPoweredBy() {
30 - global $wgVersion, $wgUser;
 30+ global $wgVersion;
3131 $text = "<div class='mw_poweredby'>Powered by MediaWiki $wgVersion</div>";
32 - wfRunHooks( 'SkinGetPoweredBy', array( &$text, $wgUser->getSkin()->getSkinName() ) );
 32+ wfRunHooks( 'SkinGetPoweredBy', array( &$text, $this ) );
3333 return $text;
3434 }
3535
Index: trunk/phase3/docs/hooks.txt
@@ -1464,7 +1464,7 @@
14651465 'SkinGetPoweredBy'
14661466 &$text: additional 'powered by' icons in HTML.
14671467 Note: Modern skin does not use the MediaWiki icon but plain text instead
1468 -$skin: Name of the skin
 1468+$skin: Skin object
14691469
14701470 'SkinSubPageSubtitle': At the beginning of Skin::subPageSubtitle()
14711471 &$subpages: Subpage links HTML
Index: trunk/phase3/includes/Skin.php
@@ -1547,11 +1547,11 @@
15481548 * @return string
15491549 */
15501550 function getPoweredBy() {
1551 - global $wgStylePath, $wgUser;
 1551+ global $wgStylePath;
15521552
15531553 $url = htmlspecialchars( "$wgStylePath/common/images/poweredby_mediawiki_88x31.png" );
15541554 $text = '<a href="http://www.mediawiki.org/"><img src="' . $url . '" height="31" width="88" alt="Powered by MediaWiki" /></a>';
1555 - wfRunHooks( 'SkinGetPoweredBy', array( &$text, $wgUser->getSkin()->getSkinName() ) );
 1555+ wfRunHooks( 'SkinGetPoweredBy', array( &$text, $this ) );
15561556 return $text;
15571557 }
15581558

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76434* (bug 22463) Add hook 'SkinGetPoweredBy' to make 'powered by' icon customizable...raymond08:18, 10 November 2010
r76570Follow-up r76434: Run hook for Modern skin too per suggestion of Jack Phoenixraymond12:16, 12 November 2010
r76668Follow-up r76434, r76570: Add skinname per CRraymond19:28, 14 November 2010

Status & tagging log