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

Revision: 97878
Author:   preilly
Date:     2011-09-23 01:06:58 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
fix for TestCanonicalRedirect hook

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

Modified: trunk/extensions/MobileFrontend/MobileFrontend.php
===================================================================
--- trunk/extensions/MobileFrontend/MobileFrontend.php  2011-09-23 01:01:18 UTC 
(rev 97877)
+++ trunk/extensions/MobileFrontend/MobileFrontend.php  2011-09-23 01:06:58 UTC 
(rev 97878)
@@ -84,7 +84,7 @@
 }
 
 class ExtMobileFrontend {
-       const VERSION = '0.5.69';
+       const VERSION = '0.5.70';
 
        /**
         * @var DOMDocument
@@ -201,7 +201,11 @@
        
        public function testCanonicalRedirect( $request, $title, $output ) {
                $xDevice = isset( $_SERVER['HTTP_X_DEVICE'] ) ? 
$_SERVER['HTTP_X_DEVICE'] : '';
-               return ( empty( $xDevice ) );
+               if ( empty( $xDevice ) ) {
+                       return true; // Let the redirect happen
+               } else {
+                       return false; // Prevent the redirect for occuring
+               }
        }
 
        public function addMobileFooter( &$obj, &$tpl ) {


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

Reply via email to