Index: branches/liquidthreads/extensions/LqtExtension.php |
— | — | @@ -322,6 +322,43 @@ |
323 | 323 | } |
324 | 324 | } |
325 | 325 | |
| 326 | +/* |
| 327 | + The Thread special page pseudo-namespace follows. We have to do this goofy wgExtensionFunctions |
| 328 | + run-around because the files required by SpecialPage aren't required_onced() yet by the time |
| 329 | + this file is. Don't ask me why. |
| 330 | +*/ |
326 | 331 | |
| 332 | +$wgExtensionFunctions[] = 'wfLqtSpecialThreadPage'; |
| 333 | +$wgExtensionCredits['specialpage'][] = array( |
| 334 | + 'name' => 'Thread', |
| 335 | + 'description' => 'An important part of Liquid Threads.', |
| 336 | + 'author' => 'David McCabe' |
| 337 | +); |
| 338 | + |
| 339 | +function wfLqtSpecialThreadPage() { |
| 340 | + global $wgMessageCache; |
| 341 | + |
| 342 | + require_once('SpecialPage.php'); |
| 343 | + |
| 344 | + $wgMessageCache->addMessage( 'thread', 'Thread' ); |
| 345 | + |
| 346 | + class SpecialThreadPage extends SpecialPage { |
| 347 | + |
| 348 | + function __construct() { |
| 349 | + SpecialPage::SpecialPage( 'Thread' ); |
| 350 | + $this->includable( false ); |
| 351 | + } |
| 352 | + |
| 353 | + function execute( $par = null ) { |
| 354 | + global $wgOut, $wgRequest, $wgUser, $wgTitle; |
| 355 | + $this->sk = $wgUser->getSkin(); |
| 356 | + $this->setHeaders(); |
| 357 | + $wgOut->addHtml( "Foo." ); |
| 358 | + } |
| 359 | + } |
| 360 | + |
| 361 | + SpecialPage::addPage( new SpecialThreadPage() ); |
327 | 362 | } |
328 | 363 | |
| 364 | +} |
| 365 | + |