http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88980

Revision: 88980
Author:   preilly
Date:     2011-05-27 17:30:06 +0000 (Fri, 27 May 2011)
Log Message:
-----------
fix some variable names and add css variable

Modified Paths:
--------------
    trunk/extensions/PatchOutputMobile/PatchOutputMobile.php
    trunk/extensions/PatchOutputMobile/views/information/disable.html.php
    trunk/extensions/PatchOutputMobile/views/layout/_footmenu_default.html.php
    trunk/extensions/PatchOutputMobile/views/layout/_search_webkit.html.php
    trunk/extensions/PatchOutputMobile/views/layout/application.html.php

Modified: trunk/extensions/PatchOutputMobile/PatchOutputMobile.php
===================================================================
--- trunk/extensions/PatchOutputMobile/PatchOutputMobile.php    2011-05-27 
17:06:44 UTC (rev 88979)
+++ trunk/extensions/PatchOutputMobile/PatchOutputMobile.php    2011-05-27 
17:30:06 UTC (rev 88980)
@@ -39,7 +39,7 @@
                                                                                
        'onOutputPageBeforeHTML' );
 
 class ExtPatchOutputMobile {
-       const VERSION = '0.3.7';
+       const VERSION = '0.3.8';
 
        private $doc;
        
@@ -138,16 +138,17 @@
                if ( $this->contentFormat == 'XHTML' ) {
                        $dir = self::$dir;
                        $code = self::$code;
-                       $regular_wikipedia = 
self::$messages['patch-output-mobile-regular-wikipedia'];
-                       $perm_stop_redirect = 
self::$messages['patch-output-mobile-perm-stop-redirect'];
+                       $regularWikipedia = 
self::$messages['patch-output-mobile-regular-wikipedia'];
+                       $permStopRedirect = 
self::$messages['patch-output-mobile-perm-stop-redirect'];
                        $copyright = 
self::$messages['patch-output-mobile-copyright'];
-                       $home_button = 
self::$messages['patch-output-mobile-home-button'];
-                       $random_button = 
self::$messages['patch-output-mobile-random-button'];
-                       $are_you_sure = 
self::$messages['patch-output-mobile-are-you-sure'];
-                       $explain_disable = 
self::$messages['patch-output-mobile-explain-disable'];
-                       $disable_button = 
self::$messages['patch-output-mobile-disable-button'];
-                       $back_button = 
self::$messages['patch-output-mobile-back-button'];
+                       $homeButton = 
self::$messages['patch-output-mobile-home-button'];
+                       $randomButton = 
self::$messages['patch-output-mobile-random-button'];
+                       $areYouSure = 
self::$messages['patch-output-mobile-are-you-sure'];
+                       $explainDisable = 
self::$messages['patch-output-mobile-explain-disable'];
+                       $disableButton = 
self::$messages['patch-output-mobile-disable-button'];
+                       $backButton = 
self::$messages['patch-output-mobile-back-button'];
                        $title = $are_you_sure;
+                       $cssFileName = ( isset( self::$device['css_file_name'] 
) ) ? self::$device['css_file_name'] : 'default';
                        require( 'views/notices/_donate.html.php' );
                        require( 'views/layout/_search_webkit.html.php' );
                        require( 'views/layout/_footmenu_default.html.php' );
@@ -353,12 +354,14 @@
                
                $dir = self::$dir;
                $code = self::$code;
-               $regular_wikipedia = 
self::$messages['patch-output-mobile-regular-wikipedia'];
-               $perm_stop_redirect = 
self::$messages['patch-output-mobile-perm-stop-redirect'];
+               $regularWikipedia = 
self::$messages['patch-output-mobile-regular-wikipedia'];
+               $permStopRedirect = 
self::$messages['patch-output-mobile-perm-stop-redirect'];
                $copyright = self::$messages['patch-output-mobile-copyright'];
-               $home_button = 
self::$messages['patch-output-mobile-home-button'];
-               $random_button = 
self::$messages['patch-output-mobile-random-button'];
+               $homeButton = 
self::$messages['patch-output-mobile-home-button'];
+               $randomButton = 
self::$messages['patch-output-mobile-random-button'];
                
+               $cssFileName = ( isset( self::$device['css_file_name'] ) ) ? 
self::$device['css_file_name'] : 'default';
+               
                if ( strlen( $contentHtml ) > 4000 && $this->contentFormat == 
'XHTML' 
                        && self::$device['supports_javascript'] === true ) {
                        $contentHtml =  $this->javascriptize( $contentHtml );

Modified: trunk/extensions/PatchOutputMobile/views/information/disable.html.php
===================================================================
--- trunk/extensions/PatchOutputMobile/views/information/disable.html.php       
2011-05-27 17:06:44 UTC (rev 88979)
+++ trunk/extensions/PatchOutputMobile/views/information/disable.html.php       
2011-05-27 17:30:06 UTC (rev 88980)
@@ -1,19 +1,19 @@
 <?php
 $disableHtml = <<<EOT
  <h1> 
-          {$are_you_sure}
+          {$areYouSure}
         </h1> 
         <p> 
-          {$explain_disable}
+          {$explainDisable}
         </p> 
         <div id='disableButtons'> 
           <form action='http://en.wikipedia.org/w/mobileRedirect.php' 
method='get'> 
             <input name='to' type='hidden' value='http://en.wikipedia.org/' /> 
             <input name='expires_in_days' type='hidden' value='3650' /> 
-            <button id='disableButton' 
type='submit'>{$disable_button}</button> 
+            <button id='disableButton' type='submit'>{$disableButton}</button> 
           </form> 
           <form action='/' method='get'> 
-            <button id='backButton' type='submit'>{$back_button}</button> 
+            <button id='backButton' type='submit'>{$backButton}</button> 
           </form> 
         </div>
 EOT;

Modified: 
trunk/extensions/PatchOutputMobile/views/layout/_footmenu_default.html.php
===================================================================
--- trunk/extensions/PatchOutputMobile/views/layout/_footmenu_default.html.php  
2011-05-27 17:06:44 UTC (rev 88979)
+++ trunk/extensions/PatchOutputMobile/views/layout/_footmenu_default.html.php  
2011-05-27 17:30:06 UTC (rev 88980)
@@ -4,9 +4,9 @@
     <div id='footer'> 
       <div class='nav' id='footmenu'> 
         <div class='mwm-notice'> 
-          <a href="?m_action=view_normal_site">{$regular_wikipedia}</a> 
+          <a href="?m_action=view_normal_site">{$regularWikipedia}</a> 
             <div id="perm"> 
-              <a 
href="?m_action=disable_mobile_site">{$perm_stop_redirect}</a> 
+              <a href="?m_action=disable_mobile_site">{$permStopRedirect}</a> 
             </div> 
         </div> 
       </div> 

Modified: 
trunk/extensions/PatchOutputMobile/views/layout/_search_webkit.html.php
===================================================================
--- trunk/extensions/PatchOutputMobile/views/layout/_search_webkit.html.php     
2011-05-27 17:06:44 UTC (rev 88979)
+++ trunk/extensions/PatchOutputMobile/views/layout/_search_webkit.html.php     
2011-05-27 17:30:06 UTC (rev 88980)
@@ -15,8 +15,8 @@
     </form> 
   </div> 
   <div class='nav' id='nav'> 
-    <form method="get" action="/"><button type="submit" 
id="homeButton">{$home_button}</button></form> 
-    <form method="get" action="/wiki/::Random"><button type="submit" 
id="randomButton">{$random_button}</button></form> 
+    <form method="get" action="/"><button type="submit" 
id="homeButton">{$homeButton}</button></form> 
+    <form method="get" action="/wiki/::Random"><button type="submit" 
id="randomButton">{$randomButton}</button></form> 
   </div> 
 </div>
 EOD;

Modified: trunk/extensions/PatchOutputMobile/views/layout/application.html.php
===================================================================
--- trunk/extensions/PatchOutputMobile/views/layout/application.html.php        
2011-05-27 17:06:44 UTC (rev 88979)
+++ trunk/extensions/PatchOutputMobile/views/layout/application.html.php        
2011-05-27 17:30:06 UTC (rev 88980)
@@ -5,7 +5,7 @@
   <head> 
     <title>{$title}</title> 
     <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
-    <link href='http://en.m.wikipedia.org/stylesheets/webkit.css' media='all' 
rel='Stylesheet' type='text/css' /> 
+    <link href='http://en.m.wikipedia.org/stylesheets/{$cssFileName}.css' 
media='all' rel='Stylesheet' type='text/css' /> 
     <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" /> 
     <meta name = "viewport" content = "width=device-width; initial-scale=1.0; 
maximum-scale=1.0; user-scalable=0;" /> 
     <link rel="apple-touch-icon" 
href="http://en.m.wikipedia.org/apple-touch-icon.png"; /> 


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to