r97878 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97877‎ | r97878 | r97879 >
Date:01:06, 23 September 2011
Author:preilly
Status:ok (Comments)
Tags:
Comment:
fix for TestCanonicalRedirect hook
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -84,7 +84,7 @@
8585 }
8686
8787 class ExtMobileFrontend {
88 - const VERSION = '0.5.69';
 88+ const VERSION = '0.5.70';
8989
9090 /**
9191 * @var DOMDocument
@@ -201,7 +201,11 @@
202202
203203 public function testCanonicalRedirect( $request, $title, $output ) {
204204 $xDevice = isset( $_SERVER['HTTP_X_DEVICE'] ) ? $_SERVER['HTTP_X_DEVICE'] : '';
205 - return ( empty( $xDevice ) );
 205+ if ( empty( $xDevice ) ) {
 206+ return true; // Let the redirect happen
 207+ } else {
 208+ return false; // Prevent the redirect for occuring
 209+ }
206210 }
207211
208212 public function addMobileFooter( &$obj, &$tpl ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97876fix for TestCanonicalRedirect hookpreilly01:00, 23 September 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   01:07, 23 September 2011

wooooohoooo

Status & tagging log