From d136c4b227c1ff3aec80df67f4993510f96fd612 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 21 Jul 2011 11:43:05 +0000 Subject: [PATCH] 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. --- RELEASE-NOTES-1.19 | 1 + docs/hooks.txt | 3 --- includes/SkinTemplate.php | 22 ++-------------------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 78d8fab4ac..3331752bca 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -11,6 +11,7 @@ MediaWiki 1.19 is an alpha-quality branch and is not recommended for use in production. === Configuration changes in 1.19 === +* Removed SkinTemplateSetupPageCss hook; use BeforePageDisplay instead. === New features in 1.19 === * (bug 19838) Possibility to get all interwiki prefixes if the interwiki diff --git a/docs/hooks.txt b/docs/hooks.txt index 6ad299a115..d5521c076f 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1563,9 +1563,6 @@ starts page output $sktemplate: SkinTemplate object $res: set to true to prevent active tabs -'SkinTemplateSetupPageCss': use this to provide per-page CSS -$out: Css to return - 'SkinTemplateTabAction': Override SkinTemplate::tabAction(). You can either create your own array, or alter the parameters for the normal one. diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 4b7def172a..702e6aeffc 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -183,14 +183,10 @@ class SkinTemplate extends Skin { wfProfileOut( __METHOD__ . '-stuff' ); wfProfileIn( __METHOD__ . '-stuff-head' ); - if ( $this->useHeadElement ) { - $pagecss = $this->setupPageCss(); - if( $pagecss ) - $out->addInlineStyle( $pagecss ); - } else { + if ( !$this->useHeadElement ) { $this->setupUserCss( $out ); - $tpl->set( 'pagecss', $this->setupPageCss() ); + $tpl->set( 'pagecss', false ); $tpl->set( 'usercss', false ); $this->userjs = $this->userjsprev = false; @@ -1307,20 +1303,6 @@ class SkinTemplate extends Skin { wfProfileOut( __METHOD__ ); } - /** - * Code for extensions to hook into to provide per-page CSS, see - * extensions/PageCSS/PageCSS.php for an implementation of this. - * - * @private - */ - function setupPageCss() { - wfProfileIn( __METHOD__ ); - $out = false; - wfRunHooks( 'SkinTemplateSetupPageCss', array( &$out ) ); - wfProfileOut( __METHOD__ ); - return $out; - } - public function commonPrintStylesheet() { return false; } -- 2.20.1