r92740 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92739‎ | r92740 | r92741 >
Date:11:43, 21 July 2011
Author:ialex
Status:ok
Tags:backcompat 
Comment:
Removed SkinTemplateSetupPageCss hook and SkinTemplate::setupPageCss(), no extension use this anymore. This can only add raw CSS to page; it is much better to use the ResourceLoader (or to link to a file). But if it is really needed, extensions can use the BeforePageDisplay to achieve the same functionnality.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -1563,9 +1563,6 @@
15641564 $sktemplate: SkinTemplate object
15651565 $res: set to true to prevent active tabs
15661566
1567 -'SkinTemplateSetupPageCss': use this to provide per-page CSS
1568 -$out: Css to return
1569 -
15701567 'SkinTemplateTabAction': Override SkinTemplate::tabAction().
15711568 You can either create your own array, or alter the parameters for
15721569 the normal one.
Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -11,6 +11,7 @@
1212 production.
1313
1414 === Configuration changes in 1.19 ===
 15+* Removed SkinTemplateSetupPageCss hook; use BeforePageDisplay instead.
1516
1617 === New features in 1.19 ===
1718 * (bug 19838) Possibility to get all interwiki prefixes if the interwiki
Index: trunk/phase3/includes/SkinTemplate.php
@@ -183,14 +183,10 @@
184184 wfProfileOut( __METHOD__ . '-stuff' );
185185
186186 wfProfileIn( __METHOD__ . '-stuff-head' );
187 - if ( $this->useHeadElement ) {
188 - $pagecss = $this->setupPageCss();
189 - if( $pagecss )
190 - $out->addInlineStyle( $pagecss );
191 - } else {
 187+ if ( !$this->useHeadElement ) {
192188 $this->setupUserCss( $out );
193189
194 - $tpl->set( 'pagecss', $this->setupPageCss() );
 190+ $tpl->set( 'pagecss', false );
195191 $tpl->set( 'usercss', false );
196192
197193 $this->userjs = $this->userjsprev = false;
@@ -1307,20 +1303,6 @@
13081304 wfProfileOut( __METHOD__ );
13091305 }
13101306
1311 - /**
1312 - * Code for extensions to hook into to provide per-page CSS, see
1313 - * extensions/PageCSS/PageCSS.php for an implementation of this.
1314 - *
1315 - * @private
1316 - */
1317 - function setupPageCss() {
1318 - wfProfileIn( __METHOD__ );
1319 - $out = false;
1320 - wfRunHooks( 'SkinTemplateSetupPageCss', array( &$out ) );
1321 - wfProfileOut( __METHOD__ );
1322 - return $out;
1323 - }
1324 -
13251307 public function commonPrintStylesheet() {
13261308 return false;
13271309 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r92744Fix for r92740: removed debugging codeialex12:13, 21 July 2011

Status & tagging log