Index: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( &$wgExtMobileFrontend, 'addMobileFooter' ); |
51 | 51 | |
52 | 52 | class ExtMobileFrontend { |
53 | | - const VERSION = '0.5.19'; |
| 53 | + const VERSION = '0.5.21'; |
54 | 54 | |
55 | 55 | /** |
56 | 56 | * @var DOMDocument |
— | — | @@ -225,7 +225,7 @@ |
226 | 226 | self::$format = $wgRequest->getText( 'format' ); |
227 | 227 | self::$requestedSegment = $wgRequest->getText( 'seg', 0 ); |
228 | 228 | self::$search = $wgRequest->getText( 'search' ); |
229 | | - self::$callback = $wgRequest->getText( 'callback' ); |
| 229 | + self::$callback = $wgRequest->getText( 'callback' ); |
230 | 230 | |
231 | 231 | $acceptHeader = $_SERVER["HTTP_ACCEPT"]; |
232 | 232 | $device = new DeviceDetection(); |
— | — | @@ -265,6 +265,8 @@ |
266 | 266 | |
267 | 267 | if ( $mAction == 'opt_in_cookie' ) { |
268 | 268 | $this->setOptInOutCookie( '1' ); |
| 269 | + $location = Title::newMainPage()->getFullURL(); |
| 270 | + header( 'Location: ' . $location ); |
269 | 271 | } |
270 | 272 | |
271 | 273 | if ( $mAction == 'opt_out_cookie' ) { |
— | — | @@ -356,17 +358,17 @@ |
357 | 359 | $this->getMsg(); |
358 | 360 | $dir = self::$dir; |
359 | 361 | $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']; |
371 | 373 | $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default'; |
372 | 374 | require( 'views/layout/_search_webkit.html.php' ); |
373 | 375 | require( 'views/layout/_footmenu_default.html.php' ); |
— | — | @@ -383,17 +385,17 @@ |
384 | 386 | $this->getMsg(); |
385 | 387 | $dir = self::$dir; |
386 | 388 | $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']; |
398 | 400 | $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default'; |
399 | 401 | require( 'views/layout/_search_webkit.html.php' ); |
400 | 402 | require( 'views/layout/_footmenu_default.html.php' ); |
— | — | @@ -410,16 +412,16 @@ |
411 | 413 | $this->getMsg(); |
412 | 414 | $dir = self::$dir; |
413 | 415 | $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']; |
424 | 426 | $htmlTitle = $areYouSure; |
425 | 427 | $title = $areYouSure; |
426 | 428 | $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default'; |