dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df2306b
)
Now that wfParseUrl() can handle protocol-relative URLs, make wfExpandUrl() work...
author
Roan Kattouw
<catrope@users.mediawiki.org>
Wed, 13 Jul 2011 00:03:27 +0000
(
00:03
+0000)
committer
Roan Kattouw
<catrope@users.mediawiki.org>
Wed, 13 Jul 2011 00:03:27 +0000
(
00:03
+0000)
includes/GlobalFunctions.php
patch
|
blob
|
history
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
12b1309
..
8aa13e7
100644
(file)
--- a/
includes/GlobalFunctions.php
+++ b/
includes/GlobalFunctions.php
@@
-437,7
+437,7
@@
function wfExpandUrl( $url ) {
global $wgServer;
if( substr( $url, 0, 2 ) == '//' ) {
$bits = wfParseUrl( $wgServer );
- $scheme = $bits ? $bits['scheme'] : 'http';
+ $scheme = $bits
&& $bits['scheme'] !== ''
? $bits['scheme'] : 'http';
return $scheme . ':' . $url;
} elseif( substr( $url, 0, 1 ) == '/' ) {
return $wgServer . $url;