Index: trunk/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -113,16 +113,16 @@ |
114 | 114 | function efCentralNoticeSetup() { |
115 | 115 | global $wgHooks, $wgNoticeInfrastructure, $wgAutoloadClasses, $wgSpecialPages; |
116 | 116 | global $wgCentralNoticeLoader; |
117 | | - |
| 117 | + |
118 | 118 | $dir = dirname( __FILE__ ) . '/'; |
119 | | - |
| 119 | + |
120 | 120 | if( $wgCentralNoticeLoader ) { |
121 | 121 | $wgHooks['BeforePageDisplay'][] = 'efCentralNoticeLoader'; |
122 | 122 | $wgHooks['SiteNoticeAfter'][] = 'efCentralNoticeDisplay'; |
123 | 123 | } |
124 | | - |
| 124 | + |
125 | 125 | $wgAutoloadClasses['NoticePage'] = $dir . 'NoticePage.php'; |
126 | | - |
| 126 | + |
127 | 127 | if ( $wgNoticeInfrastructure ) { |
128 | 128 | $wgSpecialPages['CentralNotice'] = 'CentralNotice'; |
129 | 129 | $wgSpecialPageGroups['CentralNotice'] = 'wiki'; // Wiki data and tools" |
— | — | @@ -133,7 +133,7 @@ |
134 | 134 | |
135 | 135 | $wgSpecialPages['NoticeTemplate'] = 'SpecialNoticeTemplate'; |
136 | 136 | $wgAutoloadClasses['SpecialNoticeTemplate'] = $dir . 'SpecialNoticeTemplate.php'; |
137 | | - $wgAutoloadClasses['CentralNoticeDB'] = $dir. 'CentralNotice.db.php'; |
| 137 | + $wgAutoloadClasses['CentralNoticeDB'] = $dir. 'CentralNotice.db.php'; |
138 | 138 | } |
139 | 139 | } |
140 | 140 | |
— | — | @@ -141,10 +141,10 @@ |
142 | 142 | global $wgScript, $wgUser, $wgOut, $wgLang; |
143 | 143 | global $wgStyleVersion, $wgJsMimeType; |
144 | 144 | global $wgNoticeProject; |
145 | | - |
| 145 | + |
146 | 146 | global $wgNoticeCentralPath; |
147 | 147 | global $wgNoticeLocalPath; |
148 | | - |
| 148 | + |
149 | 149 | $lang = $wgLang->getCode(); |
150 | 150 | $centralNotice = "$wgNoticeProject/$lang/centralnotice.js"; |
151 | 151 | /* |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | : 'anonnotice.js'; |
155 | 155 | */ |
156 | 156 | |
157 | | - |
| 157 | + |
158 | 158 | if ( $wgNoticeCentralPath === false ) { |
159 | 159 | $centralLoader = SpecialPage::getTitleFor( 'NoticeText', $centralNotice )->getLocalUrl(); |
160 | 160 | } else { |
— | — | @@ -173,7 +173,7 @@ |
174 | 174 | // Load the notice text from <head> |
175 | 175 | $wgOut->addInlineScript( "var wgNotice='';var wgNoticeLocal='';" ); |
176 | 176 | $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"$encCentralLoader?$wgStyleVersion\"></script>\n" ); |
177 | | - |
| 177 | + |
178 | 178 | return true; |
179 | 179 | } |
180 | 180 | |