resourceloader: Remove wfExpandUrl() from ResourceLoaderImage
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 1 Apr 2016 23:22:29 +0000 (00:22 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 1 Apr 2016 23:25:11 +0000 (00:25 +0100)
Follows-up b5e69c4ef which did the same for already for ResourceLoader.php.

There's no need to expand the hostname into these urls. If load.php
is on the same domain (e.g. set to '/w/load.php') then this can be
resolved by the browser normally.

If load.php is on a custom domain, the stylesheet would be served
from there instead of from the wiki domain. However in that case
the hostname would already be part of $script value ($wgLoadScript).

Bug: T125292
Change-Id: I7242445335d69d7ae290da5f321a59edd537d819

includes/resourceloader/ResourceLoaderImage.php

index f784d03..87e5fd7 100644 (file)
@@ -179,7 +179,7 @@ class ResourceLoaderImage {
                        'version' => $context->getVersion(),
                ];
 
-               return wfExpandUrl( wfAppendQuery( $script, $query ), PROTO_RELATIVE );
+               return wfAppendQuery( $script, $query );
        }
 
        /**