r94388 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94387‎ | r94388 | r94389 >
Date:21:43, 12 August 2011
Author:preilly
Status:ok
Tags:
Comment:
mft r94387
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php
@@ -49,7 +49,7 @@
5050 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( &$wgExtMobileFrontend, 'addMobileFooter' );
5151
5252 class ExtMobileFrontend {
53 - const VERSION = '0.5.19';
 53+ const VERSION = '0.5.21';
5454
5555 /**
5656 * @var DOMDocument
@@ -225,7 +225,7 @@
226226 self::$format = $wgRequest->getText( 'format' );
227227 self::$requestedSegment = $wgRequest->getText( 'seg', 0 );
228228 self::$search = $wgRequest->getText( 'search' );
229 - self::$callback = $wgRequest->getText( 'callback' );
 229+ self::$callback = $wgRequest->getText( 'callback' );
230230
231231 $acceptHeader = $_SERVER["HTTP_ACCEPT"];
232232 $device = new DeviceDetection();
@@ -265,6 +265,8 @@
266266
267267 if ( $mAction == 'opt_in_cookie' ) {
268268 $this->setOptInOutCookie( '1' );
 269+ $location = Title::newMainPage()->getFullURL();
 270+ header( 'Location: ' . $location );
269271 }
270272
271273 if ( $mAction == 'opt_out_cookie' ) {
@@ -356,17 +358,17 @@
357359 $this->getMsg();
358360 $dir = self::$dir;
359361 $code = self::$code;
360 - $regularSite = self::$messages['mobile-frontend-regular-site'];
361 - $permStopRedirect = self::$messages['mobile-frontend-perm-stop-redirect'];
362 - $copyright = self::$messages['mobile-frontend-copyright'];
363 - $homeButton = self::$messages['mobile-frontend-home-button'];
364 - $randomButton = self::$messages['mobile-frontend-random-button'];
365 - $yesButton = self::$messages['mobile-frontend-opt-in-yes-button'];
366 - $noButton = self::$messages['mobile-frontend-opt-in-no-button'];
367 - $htmlTitle = self::$messages['mobile-frontend-opt-in-title'];
368 - $explainOptIn = self::$messages['mobile-frontend-opt-in-explain'];
369 - $disableImages = self::$messages['mobile-frontend-disable-images'];
370 - $optInMessage = self::$messages['mobile-frontend-opt-in-message'];
 362+ $regularSite = self::$messages['mobile-frontend-regular-site'];
 363+ $permStopRedirect = self::$messages['mobile-frontend-perm-stop-redirect'];
 364+ $copyright = self::$messages['mobile-frontend-copyright'];
 365+ $homeButton = self::$messages['mobile-frontend-home-button'];
 366+ $randomButton = self::$messages['mobile-frontend-random-button'];
 367+ $yesButton = self::$messages['mobile-frontend-opt-in-yes-button'];
 368+ $noButton = self::$messages['mobile-frontend-opt-in-no-button'];
 369+ $htmlTitle = self::$messages['mobile-frontend-opt-in-title'];
 370+ $explainOptIn = self::$messages['mobile-frontend-opt-in-explain'];
 371+ $disableImages = self::$messages['mobile-frontend-disable-images'];
 372+ $optInMessage = self::$messages['mobile-frontend-opt-in-message'];
371373 $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default';
372374 require( 'views/layout/_search_webkit.html.php' );
373375 require( 'views/layout/_footmenu_default.html.php' );
@@ -383,17 +385,17 @@
384386 $this->getMsg();
385387 $dir = self::$dir;
386388 $code = self::$code;
387 - $regularSite = self::$messages['mobile-frontend-regular-site'];
388 - $permStopRedirect = self::$messages['mobile-frontend-perm-stop-redirect'];
389 - $copyright = self::$messages['mobile-frontend-copyright'];
390 - $homeButton = self::$messages['mobile-frontend-home-button'];
391 - $randomButton = self::$messages['mobile-frontend-random-button'];
392 - $yesButton = self::$messages['mobile-frontend-opt-out-yes-button'];
393 - $noButton = self::$messages['mobile-frontend-opt-out-no-button'];
394 - $htmlTitle = self::$messages['mobile-frontend-opt-out-title'];
395 - $explainOptOut = self::$messages['mobile-frontend-opt-out-explain'];
396 - $optOutMessage = self::$messages['mobile-frontend-opt-out-message'];
397 - $disableImages = self::$messages['mobile-frontend-disable-images'];
 389+ $regularSite = self::$messages['mobile-frontend-regular-site'];
 390+ $permStopRedirect = self::$messages['mobile-frontend-perm-stop-redirect'];
 391+ $copyright = self::$messages['mobile-frontend-copyright'];
 392+ $homeButton = self::$messages['mobile-frontend-home-button'];
 393+ $randomButton = self::$messages['mobile-frontend-random-button'];
 394+ $yesButton = self::$messages['mobile-frontend-opt-out-yes-button'];
 395+ $noButton = self::$messages['mobile-frontend-opt-out-no-button'];
 396+ $htmlTitle = self::$messages['mobile-frontend-opt-out-title'];
 397+ $explainOptOut = self::$messages['mobile-frontend-opt-out-explain'];
 398+ $optOutMessage = self::$messages['mobile-frontend-opt-out-message'];
 399+ $disableImages = self::$messages['mobile-frontend-disable-images'];
398400 $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default';
399401 require( 'views/layout/_search_webkit.html.php' );
400402 require( 'views/layout/_footmenu_default.html.php' );
@@ -410,16 +412,16 @@
411413 $this->getMsg();
412414 $dir = self::$dir;
413415 $code = self::$code;
414 - $regularSite = self::$messages['mobile-frontend-regular-site'];
415 - $permStopRedirect = self::$messages['mobile-frontend-perm-stop-redirect'];
416 - $copyright = self::$messages['mobile-frontend-copyright'];
417 - $homeButton = self::$messages['mobile-frontend-home-button'];
418 - $randomButton = self::$messages['mobile-frontend-random-button'];
419 - $areYouSure = self::$messages['mobile-frontend-are-you-sure'];
420 - $explainDisable = self::$messages['mobile-frontend-explain-disable'];
421 - $disableButton = self::$messages['mobile-frontend-disable-button'];
422 - $backButton = self::$messages['mobile-frontend-back-button'];
423 - $disableImages = self::$messages['mobile-frontend-disable-images'];
 416+ $regularSite = self::$messages['mobile-frontend-regular-site'];
 417+ $permStopRedirect = self::$messages['mobile-frontend-perm-stop-redirect'];
 418+ $copyright = self::$messages['mobile-frontend-copyright'];
 419+ $homeButton = self::$messages['mobile-frontend-home-button'];
 420+ $randomButton = self::$messages['mobile-frontend-random-button'];
 421+ $areYouSure = self::$messages['mobile-frontend-are-you-sure'];
 422+ $explainDisable = self::$messages['mobile-frontend-explain-disable'];
 423+ $disableButton = self::$messages['mobile-frontend-disable-button'];
 424+ $backButton = self::$messages['mobile-frontend-back-button'];
 425+ $disableImages = self::$messages['mobile-frontend-disable-images'];
424426 $htmlTitle = $areYouSure;
425427 $title = $areYouSure;
426428 $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94387add redirect to main page after cookie is set for opt-in testingpreilly21:36, 12 August 2011

Status & tagging log