r98197 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98196‎ | r98197 | r98198 >
Date:23:18, 26 September 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r98193, r98194
Modified paths:
  • /branches/wmf/1.17wmf1/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/parser/Parser.php
@@ -2715,10 +2715,8 @@
27162716 case 'server':
27172717 return $wgServer;
27182718 case 'servername':
2719 - wfSuppressWarnings(); # May give an E_WARNING in PHP < 5.3.3
2720 - $serverName = parse_url( $wgServer, PHP_URL_HOST );
2721 - wfRestoreWarnings();
2722 - return $serverName ? $serverName : $wgServer;
 2719+ $serverParts = wfParseUrl( $wgServer );
 2720+ return $serverParts && isset( $serverParts['host'] ) ? $serverParts['host'] : $wgServer;
27232721 case 'scriptpath':
27242722 return $wgScriptPath;
27252723 case 'stylepath':
Property changes on: branches/wmf/1.17wmf1/includes/parser/Parser.php
___________________________________________________________________
Modified: svn:mergeinfo
27262724 Merged /trunk/phase3/includes/parser/Parser.php:r98193-98194

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98193(bug 31176) {{SERVERNAME}} doesn't play nice with protocol-relative URLscatrope23:14, 26 September 2011
r98194Fix stupid typo in r98193, thanks Dantmancatrope23:16, 26 September 2011

Status & tagging log