r113400 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113399‎ | r113400 | r113401 >
Date:20:39, 8 March 2012
Author:preilly
Status:ok
Tags:
Comment:
1.19wmf: MFT r113399
Modified paths:
  • /branches/wmf/1.19wmf1/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.php
@@ -33,6 +33,7 @@
3434 $autoloadClasses = array (
3535 'ZeroRatedMobileAccessTemplate' => 'ZeroRatedMobileAccessTemplate',
3636 'ExtZeroRatedMobileAccess' => 'ZeroRatedMobileAccess.body',
 37+ 'ZeroRatedMobileAccess' => 'ZeroRatedMobileAccess.body',
3738 );
3839
3940 foreach ( $autoloadClasses as $className => $classFilename ) {
@@ -42,3 +43,5 @@
4344 $wgEnableZeroRatedMobileAccessTesting = false;
4445
4546 $wgHooks['BeforePageDisplay'][] = 'ExtZeroRatedMobileAccess::onBeforePageDisplay';
 47+$wgSpecialPages['ZeroRatedMobileAccess'] = 'ZeroRatedMobileAccess';
 48+$wgSpecialPageGroups['ZeroRatedMobileAccess'] = 'other';
Index: branches/wmf/1.19wmf1/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php
@@ -1,5 +1,29 @@
22 <?php
33
 4+/**
 5+ * Main class for ZeroRatedMobileAccess extension.
 6+ *
 7+ * @file
 8+ * @ingroup Extensions
 9+ */
 10+class ZeroRatedMobileAccess extends SpecialPage {
 11+ /**
 12+ * Constructor — set up the ZeroRatedMobileAccess page
 13+ */
 14+ public function __construct() {
 15+ parent::__construct( 'ZeroRatedMobileAccess' );
 16+ }
 17+
 18+ /**
 19+ * Show the special page
 20+ *
 21+ * @param $par Mixed: parameter passed to the special page or null
 22+ */
 23+ public function execute( $par ) {
 24+ $this->setHeaders();
 25+ }
 26+}
 27+
428 class ExtZeroRatedMobileAccess {
529 const VERSION = '0.0.9';
630
@@ -128,7 +152,7 @@
129153 $output .= $banner;
130154 }
131155 }
132 - if ( $out->getPageTitle() === 'Special:ZeroRated' ) {
 156+ if ( $out->getTitle()->isSpecial( 'ZeroRatedMobileAccess' ) ) {
133157 $out->clearHTML();
134158 $out->setPageTitle( null );
135159 $output .= wfMsg( 'zero-rated-mobile-access-desc' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113399move landing page to special pagepreilly20:38, 8 March 2012

Status & tagging log