Index: trunk/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.30'; |
| 53 | + const VERSION = '0.5.31'; |
54 | 54 | |
55 | 55 | /** |
56 | 56 | * @var DOMDocument |
— | — | @@ -378,21 +378,11 @@ |
379 | 379 | private function renderOptInMobileSiteXHTML() { |
380 | 380 | if ( $this->contentFormat == 'XHTML' ) { |
381 | 381 | $this->getMsg(); |
382 | | - $dir = self::$dir; |
383 | | - $code = self::$code; |
384 | | - $regularSite = self::$messages['mobile-frontend-regular-site']; |
385 | | - $permStopRedirect = self::$messages['mobile-frontend-perm-stop-redirect']; |
386 | | - $copyright = self::$messages['mobile-frontend-copyright']; |
387 | | - $homeButton = self::$messages['mobile-frontend-home-button']; |
388 | | - $randomButton = self::$messages['mobile-frontend-random-button']; |
389 | 382 | $yesButton = self::$messages['mobile-frontend-opt-in-yes-button']; |
390 | 383 | $noButton = self::$messages['mobile-frontend-opt-in-no-button']; |
391 | 384 | $htmlTitle = self::$messages['mobile-frontend-opt-in-title']; |
392 | 385 | $explainOptIn = self::$messages['mobile-frontend-opt-in-explain']; |
393 | | - $disableImages = self::$messages['mobile-frontend-disable-images']; |
394 | | - $enableImages = self::$messages['mobile-frontend-enable-images']; |
395 | 386 | $optInMessage = self::$messages['mobile-frontend-opt-in-message']; |
396 | | - $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default'; |
397 | 387 | require( 'views/layout/_search_webkit.html.php' ); |
398 | 388 | require( 'views/layout/_footmenu_default.html.php' ); |
399 | 389 | require( 'views/information/optin.html.php' ); |
— | — | @@ -406,21 +396,11 @@ |
407 | 397 | private function renderOptOutMobileSiteXHTML() { |
408 | 398 | if ( $this->contentFormat == 'XHTML' ) { |
409 | 399 | $this->getMsg(); |
410 | | - $dir = self::$dir; |
411 | | - $code = self::$code; |
412 | | - $regularSite = self::$messages['mobile-frontend-regular-site']; |
413 | | - $permStopRedirect = self::$messages['mobile-frontend-perm-stop-redirect']; |
414 | | - $copyright = self::$messages['mobile-frontend-copyright']; |
415 | | - $homeButton = self::$messages['mobile-frontend-home-button']; |
416 | | - $randomButton = self::$messages['mobile-frontend-random-button']; |
417 | 400 | $yesButton = self::$messages['mobile-frontend-opt-out-yes-button']; |
418 | 401 | $noButton = self::$messages['mobile-frontend-opt-out-no-button']; |
419 | 402 | $htmlTitle = self::$messages['mobile-frontend-opt-out-title']; |
420 | 403 | $explainOptOut = self::$messages['mobile-frontend-opt-out-explain']; |
421 | 404 | $optOutMessage = self::$messages['mobile-frontend-opt-out-message']; |
422 | | - $disableImages = self::$messages['mobile-frontend-disable-images']; |
423 | | - $enableImages = self::$messages['mobile-frontend-enable-images']; |
424 | | - $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default'; |
425 | 405 | require( 'views/layout/_search_webkit.html.php' ); |
426 | 406 | require( 'views/layout/_footmenu_default.html.php' ); |
427 | 407 | require( 'views/information/optout.html.php' ); |
— | — | @@ -434,22 +414,12 @@ |
435 | 415 | private function renderDisableMobileSiteXHTML() { |
436 | 416 | if ( $this->contentFormat == 'XHTML' ) { |
437 | 417 | $this->getMsg(); |
438 | | - $dir = self::$dir; |
439 | | - $code = self::$code; |
440 | | - $regularSite = self::$messages['mobile-frontend-regular-site']; |
441 | | - $permStopRedirect = self::$messages['mobile-frontend-perm-stop-redirect']; |
442 | | - $copyright = self::$messages['mobile-frontend-copyright']; |
443 | | - $homeButton = self::$messages['mobile-frontend-home-button']; |
444 | | - $randomButton = self::$messages['mobile-frontend-random-button']; |
445 | 418 | $areYouSure = self::$messages['mobile-frontend-are-you-sure']; |
446 | 419 | $explainDisable = self::$messages['mobile-frontend-explain-disable']; |
447 | 420 | $disableButton = self::$messages['mobile-frontend-disable-button']; |
448 | 421 | $backButton = self::$messages['mobile-frontend-back-button']; |
449 | | - $disableImages = self::$messages['mobile-frontend-disable-images']; |
450 | | - $enableImages = self::$messages['mobile-frontend-enable-images']; |
451 | 422 | $htmlTitle = $areYouSure; |
452 | 423 | $title = $areYouSure; |
453 | | - $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default'; |
454 | 424 | require( 'views/layout/_search_webkit.html.php' ); |
455 | 425 | require( 'views/layout/_footmenu_default.html.php' ); |
456 | 426 | require( 'views/information/disable.html.php' ); |
— | — | @@ -712,21 +682,9 @@ |
713 | 683 | $contentHtml = $this->DOMParseMainPage( $contentHtml ); |
714 | 684 | } |
715 | 685 | |
716 | | - $dir = self::$dir; |
717 | | - $code = self::$code; |
718 | | - $regularSite = self::$messages['mobile-frontend-regular-site']; |
719 | | - $permStopRedirect = self::$messages['mobile-frontend-perm-stop-redirect']; |
720 | | - $copyright = self::$messages['mobile-frontend-copyright']; |
721 | | - $homeButton = self::$messages['mobile-frontend-home-button']; |
722 | | - $randomButton = self::$messages['mobile-frontend-random-button']; |
723 | | - $disableImages = self::$messages['mobile-frontend-disable-images']; |
724 | | - $enableImages = self::$messages['mobile-frontend-enable-images']; |
725 | | - |
726 | 686 | $title = htmlspecialchars( self::$title->getText() ); |
727 | 687 | $htmlTitle = htmlspecialchars( self::$htmlTitle ); |
728 | 688 | |
729 | | - $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default'; |
730 | | - |
731 | 689 | if ( strlen( $contentHtml ) > 4000 && $this->contentFormat == 'XHTML' |
732 | 690 | && self::$device['supports_javascript'] === true |
733 | 691 | && empty( self::$search ) ) { |
Index: trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php |
— | — | @@ -5,6 +5,8 @@ |
6 | 6 | |
7 | 7 | $mainPageUrl = self::$mainPageUrl; |
8 | 8 | $randomPageUrl = self::$randomPageUrl; |
| 9 | +$homeButton = self::$messages['mobile-frontend-home-button']; |
| 10 | +$randomButton = self::$messages['mobile-frontend-random-button']; |
9 | 11 | |
10 | 12 | $scriptUrl = wfScript(); |
11 | 13 | |
Index: trunk/extensions/MobileFrontend/views/layout/application.wml.php |
— | — | @@ -1,6 +1,8 @@ |
2 | 2 | <?php |
3 | 3 | $mainPageUrl = self::$mainPageUrl; |
4 | 4 | $randomPageUrl = self::$randomPageUrl; |
| 5 | +$dir = self::$dir; |
| 6 | +$code = self::$code; |
5 | 7 | |
6 | 8 | $applicationHtml = <<<EOT |
7 | 9 | <?xml version='1.0' encoding='utf-8' ?> |
Index: trunk/extensions/MobileFrontend/views/layout/_footmenu_default.html.php |
— | — | @@ -1,5 +1,11 @@ |
2 | 2 | <?php |
3 | 3 | |
| 4 | +$regularSite = self::$messages['mobile-frontend-regular-site']; |
| 5 | +$permStopRedirect = self::$messages['mobile-frontend-perm-stop-redirect']; |
| 6 | +$copyright = self::$messages['mobile-frontend-copyright']; |
| 7 | +$disableImages = self::$messages['mobile-frontend-disable-images']; |
| 8 | +$enableImages = self::$messages['mobile-frontend-enable-images']; |
| 9 | + |
4 | 10 | if ( self::$disableImages == 0 ) { |
5 | 11 | $imagesToggle = $disableImages; |
6 | 12 | $imagesURL = '?disableImages=1'; |
Index: trunk/extensions/MobileFrontend/views/layout/application.html.php |
— | — | @@ -1,12 +1,17 @@ |
2 | 2 | <?php |
3 | 3 | global $wgExtensionAssetsPath, $wgAppleTouchIcon; |
4 | 4 | |
| 5 | +$dir = self::$dir; |
| 6 | +$code = self::$code; |
| 7 | + |
5 | 8 | if( $wgAppleTouchIcon !== false ) { |
6 | 9 | $appleTouchIconTag = Html::element( 'link', array( 'rel' => 'apple-touch-icon', 'href' => $wgAppleTouchIcon ) ); |
7 | 10 | } else { |
8 | 11 | $appleTouchIconTag = ""; |
9 | 12 | } |
10 | 13 | |
| 14 | +$cssFileName = ( isset( self::$device['css_file_name'] ) ) ? self::$device['css_file_name'] : 'default'; |
| 15 | + |
11 | 16 | $applicationHtml = <<<EOT |
12 | 17 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
13 | 18 | <html lang='{$code}' dir='{$dir}' xml:lang='{$code}' xmlns='http://www.w3.org/1999/xhtml'> |