http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84541
Revision: 84541
Author: ialex
Date: 2011-03-22 17:49:16 +0000 (Tue, 22 Mar 2011)
Log Message:
-----------
Add the css file directly from the special page instead of using the
SkinTemplateSetupPageCss hook
Modified Paths:
--------------
trunk/extensions/ProfileMonitor/ProfileMonitor.class.php
trunk/extensions/ProfileMonitor/ProfileMonitor.php
Modified: trunk/extensions/ProfileMonitor/ProfileMonitor.class.php
===================================================================
--- trunk/extensions/ProfileMonitor/ProfileMonitor.class.php 2011-03-22
17:42:56 UTC (rev 84540)
+++ trunk/extensions/ProfileMonitor/ProfileMonitor.class.php 2011-03-22
17:49:16 UTC (rev 84541)
@@ -15,7 +15,7 @@
}
public function execute( $par ) {
- global $wgOut, $wgRequest;
+ global $wgOut, $wgRequest, $wgExtensionAssetsPath;
wfLoadExtensionMessages( 'ProfileMonitor' );
@@ -23,6 +23,8 @@
$process = $wgRequest->getText( 'process' );
$wild = $wgRequest->getCheck( 'wildcard' );
+
+ $wgOut->addExtensionStyle( $wgExtensionAssetsPath .
'/ProfileMonitor/ProfileMonitor.css' );
$wgOut->addHTML( $this->makeSearchForm( $process, $wild ) );
if( $wgRequest->getCheck( 'submit' ) ) {
Modified: trunk/extensions/ProfileMonitor/ProfileMonitor.php
===================================================================
--- trunk/extensions/ProfileMonitor/ProfileMonitor.php 2011-03-22 17:42:56 UTC
(rev 84540)
+++ trunk/extensions/ProfileMonitor/ProfileMonitor.php 2011-03-22 17:49:16 UTC
(rev 84541)
@@ -9,7 +9,6 @@
* @author Rob Church <[email protected]>
*/
-$wgExtensionFunctions[] = 'efProfileMonitor';
$wgExtensionCredits['specialpage'][] = array(
'path' => __FILE__,
'name' => 'ProfileMonitor',
@@ -23,16 +22,3 @@
$wgExtensionAliasesFiles['ProfileMonitor'] = $dir . 'ProfileMonitor.alias.php';
$wgAutoloadClasses['ProfileMonitor'] = $dir . 'ProfileMonitor.class.php';
$wgSpecialPages['Profiling'] = 'ProfileMonitor';
-
-function efProfileMonitor() {
- $wgHooks['SkinTemplateSetupPageCss'][] = 'efProfileMonitorCss';
-}
-
-function efProfileMonitorCss( &$css ) {
- global $wgTitle;
- if( $wgTitle->isSpecial( 'Profiling' ) ) {
- $file = dirname( __FILE__ ) . '/ProfileMonitor.css';
- $css .= "/*<![CDATA[*/\n" . htmlspecialchars(
file_get_contents( $file ) ) . "\n/*]]>*/";
- }
- return true;
-}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs