Index: branches/wmf/1.17wmf1/includes/parser/Parser.php |
— | — | @@ -2715,10 +2715,8 @@ |
2716 | 2716 | case 'server': |
2717 | 2717 | return $wgServer; |
2718 | 2718 | 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; |
2723 | 2721 | case 'scriptpath': |
2724 | 2722 | return $wgScriptPath; |
2725 | 2723 | case 'stylepath': |
Property changes on: branches/wmf/1.17wmf1/includes/parser/Parser.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2726 | 2724 | Merged /trunk/phase3/includes/parser/Parser.php:r98193-98194 |