r22519 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22518‎ | r22519 | r22520 >
Date:23:17, 28 May 2007
Author:david
Status:old
Tags:
Comment:
Added Special:Thread/XXX; doesn't actually do anything yet.
Modified paths:
  • /branches/liquidthreads/extensions/LqtExtension.php (modified) (history)

Diff [purge]

Index: branches/liquidthreads/extensions/LqtExtension.php
@@ -322,6 +322,43 @@
323323 }
324324 }
325325
 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+*/
326331
 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() );
327362 }
328363
 364+}
 365+