MediaWiki r110876 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r110875‎ | r110876 (on ViewVC)‎ | r110877 >
Date:21:51, 7 February 2012
Author:maxsem
Status:ok
Tags:
Comment:
Fix for localhost
Modified paths:

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

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

Status & tagging log

  • 22:08, 8 February 2012 ^demon (Talk | contribs) changed the status of r110876 [removed: new added: ok]
Personal tools
Namespaces

Variants
Views
Actions
Navigation
Support
Download
Development
Communication
Toolbox