Index: trunk/extensions/ProfileMonitor/ProfileMonitor.class.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | } |
17 | 17 | |
18 | 18 | public function execute( $par ) { |
19 | | - global $wgOut, $wgRequest; |
| 19 | + global $wgOut, $wgRequest, $wgExtensionAssetsPath; |
20 | 20 | |
21 | 21 | wfLoadExtensionMessages( 'ProfileMonitor' ); |
22 | 22 | |
— | — | @@ -23,6 +23,8 @@ |
24 | 24 | |
25 | 25 | $process = $wgRequest->getText( 'process' ); |
26 | 26 | $wild = $wgRequest->getCheck( 'wildcard' ); |
| 27 | + |
| 28 | + $wgOut->addExtensionStyle( $wgExtensionAssetsPath . '/ProfileMonitor/ProfileMonitor.css' ); |
27 | 29 | $wgOut->addHTML( $this->makeSearchForm( $process, $wild ) ); |
28 | 30 | |
29 | 31 | if( $wgRequest->getCheck( 'submit' ) ) { |
Index: trunk/extensions/ProfileMonitor/ProfileMonitor.php |
— | — | @@ -9,7 +9,6 @@ |
10 | 10 | * @author Rob Church <robchur@gmail.com> |
11 | 11 | */ |
12 | 12 | |
13 | | -$wgExtensionFunctions[] = 'efProfileMonitor'; |
14 | 13 | $wgExtensionCredits['specialpage'][] = array( |
15 | 14 | 'path' => __FILE__, |
16 | 15 | 'name' => 'ProfileMonitor', |
— | — | @@ -23,16 +22,3 @@ |
24 | 23 | $wgExtensionAliasesFiles['ProfileMonitor'] = $dir . 'ProfileMonitor.alias.php'; |
25 | 24 | $wgAutoloadClasses['ProfileMonitor'] = $dir . 'ProfileMonitor.class.php'; |
26 | 25 | $wgSpecialPages['Profiling'] = 'ProfileMonitor'; |
27 | | - |
28 | | -function efProfileMonitor() { |
29 | | - $wgHooks['SkinTemplateSetupPageCss'][] = 'efProfileMonitorCss'; |
30 | | -} |
31 | | - |
32 | | -function efProfileMonitorCss( &$css ) { |
33 | | - global $wgTitle; |
34 | | - if( $wgTitle->isSpecial( 'Profiling' ) ) { |
35 | | - $file = dirname( __FILE__ ) . '/ProfileMonitor.css'; |
36 | | - $css .= "/*<![CDATA[*/\n" . htmlspecialchars( file_get_contents( $file ) ) . "\n/*]]>*/"; |
37 | | - } |
38 | | - return true; |
39 | | -} |