r109337 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109336‎ | r109337 | r109338 >
Date:07:46, 18 January 2012
Author:raindrift
Status:ok
Tags:
Comment:
adding stub special page for recording errors
Modified paths:
  • /trunk/extensions/CongressLookup/CongressLookup.php (modified) (history)
  • /trunk/extensions/CongressLookup/SpecialCongressFail.php (added) (history)

Diff [purge]

Index: trunk/extensions/CongressLookup/CongressLookup.php
@@ -55,10 +55,12 @@
5656 $wgAPIModules['congresslookup'] = 'ApiCongressLookup';
5757
5858 $wgAutoloadClasses['SpecialCongressLookup'] = $dir . 'SpecialCongressLookup.php';
 59+$wgAutoloadClasses['SpecialCongressFail'] = $dir . 'SpecialCongressFail.php';
5960 $wgAutoloadClasses['CongressLookupDB'] = $dir . 'CongressLookup.db.php';
6061 $wgExtensionMessagesFiles['CongressLookup'] = $dir . 'CongressLookup.i18n.php';
6162 $wgExtensionMessagesFiles['CongressLookupAlias'] = $dir . 'CongressLookup.alias.php';
6263 $wgSpecialPages['CongressLookup'] = 'SpecialCongressLookup';
 64+$wgSpecialPages['CongressFail'] = 'SpecialCongressFail';
6365
6466 $wgHooks['LoadExtensionSchemaUpdates'][] = 'congressLookupSchemaUpdate';
6567
Index: trunk/extensions/CongressLookup/SpecialCongressFail.php
@@ -0,0 +1,29 @@
 2+<?php
 3+
 4+class SpecialCongressFail extends UnlistedSpecialPage {
 5+
 6+ /**
 7+ * Constructor.
 8+ *
 9+ * @param $request is the request (usually wgRequest)
 10+ * @param $par is everything in the URL after Special:CongressFail
 11+ */
 12+ public function __construct( $request = null, $par = null ) {
 13+ parent::__construct( 'SpecialCongressFail' );
 14+ }
 15+
 16+ public function execute( $subPage ) {
 17+ global $wgRequest, $wgUser;
 18+
 19+ $out = $this->getOutput();
 20+
 21+ $this->setHeaders();
 22+ $this->outputHeader();
 23+
 24+ $out->addHtml('<body>');
 25+
 26+
 27+ $out->addHtml('</body>');
 28+ }
 29+
 30+}
Property changes on: trunk/extensions/CongressLookup/SpecialCongressFail.php
___________________________________________________________________
Added: svn:eol-style
131 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r109338wrong page name in parent constructor...raindrift07:52, 18 January 2012

Status & tagging log