r110876 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110875‎ | r110876 | r110877 >
Date:21:51, 7 February 2012
Author:maxsem
Status:ok
Tags:
Comment:
Fix for localhost
Modified paths:
  • /branches/MobileFrontend-API/MobileFrontend.body.php (modified) (history)

Diff [purge]

Index: branches/MobileFrontend-API/MobileFrontend.body.php
@@ -711,7 +711,7 @@
712712 $domainParts = array_reverse( $domainParts );
713713 // Although some browsers will accept cookies without the initial ., » RFC 2109 requires it to be included.
714714 wfProfileOut( __METHOD__ );
715 - return '.' . $domainParts[1] . '.' . $domainParts[0];
 715+ return count( $domainParts ) >= 2 ? '.' . $domainParts[1] . '.' . $domainParts[0] : $_SERVER['HTTP_HOST'];
716716 }
717717 wfProfileOut( __METHOD__ );
718718 return $_SERVER['HTTP_HOST'];

Follow-up revisions

RevisionCommit summaryAuthorDate
r110889Avoid extra DOM parse when we already have a document. Includes r110876maxsem22:34, 7 February 2012

Status & tagging log