Index: trunk/extensions/Vote/Vote.php |
— | — | @@ -41,17 +41,3 @@ |
42 | 42 | |
43 | 43 | $wgAvailableRights[] = 'vote'; |
44 | 44 | $wgAvailableRights[] = 'voteadmin'; |
45 | | - |
46 | | -$wgHooks['SkinTemplateSetupPageCss'][] = 'efVoteCss'; |
47 | | - |
48 | | -/** |
49 | | - * Add extra CSS to the skin |
50 | | - */ |
51 | | -function efVoteCss( &$css ) { |
52 | | - global $wgTitle; |
53 | | - if ( $wgTitle->isSpecial( 'Vote' ) ) { |
54 | | - $file = dirname( __FILE__ ) . '/Vote.css'; |
55 | | - $css .= "/*<![CDATA[*/\n" . htmlspecialchars( file_get_contents( $file ) ) . "\n/*]]>*/"; |
56 | | - } |
57 | | - return true; |
58 | | -} |
Index: trunk/extensions/Vote/Vote.page.php |
— | — | @@ -25,10 +25,12 @@ |
26 | 26 | * @param $mode Mixed: parameter passed to the page or null |
27 | 27 | */ |
28 | 28 | public function execute( $mode ) { |
29 | | - global $wgOut, $wgUser; |
| 29 | + global $wgOut, $wgUser, $wgExtensionAssetsPath; |
30 | 30 | |
31 | 31 | $this->setHeaders(); |
32 | 32 | $this->user = $wgUser; |
| 33 | + $wgOut->addExtensionStyle( "$wgExtensionAssetsPath/Vote/Vote.css" ); |
| 34 | + |
33 | 35 | if ( strtolower( $mode ) == 'results' ) { |
34 | 36 | if ( $wgUser->isAllowed( 'voteadmin' ) ) |
35 | 37 | $this->showResults(); |