https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114393

Revision: 114393
Author:   preilly
Date:     2012-03-21 19:21:18 +0000 (Wed, 21 Mar 2012)
Log Message:
-----------
remove WURFL to avoid,  "ScientiaMobile, Inc." licensing terms

Modified Paths:
--------------
    trunk/extensions/MobileFrontend/DeviceDetection.php
    trunk/extensions/MobileFrontend/MobileFrontend.body.php
    trunk/extensions/MobileFrontend/MobileFrontend.php

Removed Paths:
-------------
    trunk/extensions/MobileFrontend/library/

Modified: trunk/extensions/MobileFrontend/DeviceDetection.php
===================================================================
--- trunk/extensions/MobileFrontend/DeviceDetection.php 2012-03-21 19:12:39 UTC 
(rev 114392)
+++ trunk/extensions/MobileFrontend/DeviceDetection.php 2012-03-21 19:21:18 UTC 
(rev 114393)
@@ -322,7 +322,7 @@
 
                if ( $formatName === '' ) {
                        if ( strpos( $acceptHeader, 
'application/vnd.wap.xhtml+xml' ) !== false ) {
-                               // Should be wap2 or in WURFL xhtmlmp
+                               // Should be wap2
                                $formatName = 'html';
                        } elseif ( strpos( $acceptHeader, 'vnd.wap.wml' ) !== 
false ) {
                                $formatName = 'wml';

Modified: trunk/extensions/MobileFrontend/MobileFrontend.body.php
===================================================================
--- trunk/extensions/MobileFrontend/MobileFrontend.body.php     2012-03-21 
19:12:39 UTC (rev 114392)
+++ trunk/extensions/MobileFrontend/MobileFrontend.body.php     2012-03-21 
19:21:18 UTC (rev 114393)
@@ -362,32 +362,6 @@
 
                $userAgent = $_SERVER['HTTP_USER_AGENT'];
                $acceptHeader = isset( $_SERVER["HTTP_ACCEPT"] ) ? 
$_SERVER["HTTP_ACCEPT"] : '';
-               $uAmd5 = md5( $userAgent );
-
-               $key = wfMemcKey( 'mobile', 'ua', $uAmd5 );
-
-               $props = null;
-               try {
-                       $props = $wgMemc->get( $key );
-                       if ( !$props ) {
-                               $wurflConfigFile = RESOURCES_DIR . 
'wurfl-config.xml';
-                               $wurflConfig = new 
WURFL_Configuration_XmlConfig( $wurflConfigFile );
-                               $wurflManagerFactory = new 
WURFL_WURFLManagerFactory( $wurflConfig );
-                               $wurflManager = $wurflManagerFactory->create();
-                               $device = 
$wurflManager->getDeviceForHttpRequest( $_SERVER );
-
-                               if ( $device->isSpecific() === true ) {
-                                       $props = $device->getAllCapabilities();
-                                       $wgMemc->set( $key, $props, 86400 );
-                               } else {
-                                       $wgMemc->set( $key, 'generic', 86400 );
-                                       $props = 'generic';
-                               }
-                       }
-               } catch ( Exception $e ) {
-                       // echo $e->getMessage();
-               }
-
                self::$title = $out->getTitle();
 
                if ( self::$title->isMainPage() ) {

Modified: trunk/extensions/MobileFrontend/MobileFrontend.php
===================================================================
--- trunk/extensions/MobileFrontend/MobileFrontend.php  2012-03-21 19:12:39 UTC 
(rev 114392)
+++ trunk/extensions/MobileFrontend/MobileFrontend.php  2012-03-21 19:21:18 UTC 
(rev 114393)
@@ -17,15 +17,7 @@
 
 // Define the extension; allows us make sure the extension is used correctly
 define( 'MOBILEFRONTEND', 'MobileFrontend' );
-// WURFL installation dir
-define( 'WURFL_DIR', dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'library' .
-               DIRECTORY_SEPARATOR . 'WURFL' . DIRECTORY_SEPARATOR );
-// WURFL configuration files directory
-define( 'RESOURCES_DIR', dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'library' 
.
-               DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR );
 
-require_once( WURFL_DIR . 'Application.php' );
-
 // Extension credits that will show up on Special:Version
 $wgExtensionCredits['other'][] = array(
        'path' => __FILE__,


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to