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

Revision: 93735
Author:   preilly
Date:     2011-08-02 12:31:32 +0000 (Tue, 02 Aug 2011)
Log Message:
-----------
mft r93734

Modified Paths:
--------------
    branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php

Property Changed:
----------------
    branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php

Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php  
2011-08-02 12:19:37 UTC (rev 93734)
+++ branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php  
2011-08-02 12:31:32 UTC (rev 93735)
@@ -49,7 +49,7 @@
 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( &$wgExtMobileFrontend, 
'addMobileFooter' );
 
 class ExtMobileFrontend {
-       const VERSION = '0.5.8';
+       const VERSION = '0.5.10';
 
        /**
         * @var DOMDocument
@@ -116,12 +116,9 @@
        public function addMobileFooter( &$obj, &$tpl ) {
                global $wgRequest;
                $footerlinks = $tpl->data['footerlinks'];
-               $mobileViewUrl = $wgRequest->getRequestURL();
-               $delimiter = ( strpos( $mobileViewUrl, "?" ) !== false ) ? "&" 
: "?";
-               $mobileViewUrl .= $delimiter . 'useFormat=mobile';
-               $mobileViewUrl = htmlspecialchars( $mobileViewUrl );
-               
-               $tpl->set('mobileview', "<a href='{$mobileViewUrl}'>Mobile 
View</a>");
+               $mobileViewUrl = $wgRequest->escapeAppendQuery( 
'useFormat=mobile' );
+
+               $tpl->set('mobileview', "<a href='{$mobileViewUrl}'>".wfMsg( 
'mobile-frontend-view')."</a>");
                $footerlinks['places'][] = 'mobileview';
                $tpl->set('footerlinks', $footerlinks);
 
@@ -207,7 +204,7 @@
                                $wurflManagerFactory = new 
WURFL_WURFLManagerFactory( $wurflConfig );
                                $wurflManager = $wurflManagerFactory->create();
                                $device = 
$wurflManager->getDeviceForHttpRequest( $_SERVER );
-                               
+
                                if ( $device->isSpecific() === true ) {
                                        $props = $device->getAllCapabilities();
                                        $wgMemc->set( $key, $props, 86400 );
@@ -302,7 +299,7 @@
        }
 
        private function disableCaching() {
-               if ( isset( $_SERVER['HTTP_VIA'] ) && 
+               if ( isset( $_SERVER['HTTP_VIA'] ) &&
                        stripos( $_SERVER['HTTP_VIA'], '.wikimedia.org:3128' ) 
!== false ) {
                        header( 'Cache-Control: no-cache, must-revalidate' );
                        header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
@@ -454,7 +451,9 @@
        }
 
        public function DOMParse( $html ) {
-               $html = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8");   
+               global $wgSitename;
+
+               $html = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8");
                libxml_use_internal_errors( true );
                $this->doc = new DOMDocument();
                $this->doc->loadHTML( '<?xml encoding="UTF-8">' . $html );


Property changes on: 
branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/REL1_15/phase3/extensions/MobileFrontend/MobileFrontend.php:51646
/branches/new-installer/phase3/extensions/MobileFrontend/MobileFrontend.php:43664-66004
/branches/sqlite/extensions/MobileFrontend/MobileFrontend.php:58211-58321
/branches/wmf/1.16wmf4/extensions/MobileFrontend/MobileFrontend.php:67177,69199,76243,77266
/branches/wmf-deployment/extensions/MobileFrontend/MobileFrontend.php:60970
/trunk/extensions/MobileFrontend/MobileFrontend.php:93435-93734
/trunk/phase3/extensions/MobileFrontend/MobileFrontend.php:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,80406,81833,83212,83590


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

Reply via email to