Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383487 )

Change subject: Expand relative URL - CSSMin needs absolute url
......................................................................

Expand relative URL - CSSMin needs absolute url

The logo is configured as a relative URL.
CSSMin encodeImageAsDataURI requires an absolute URL.
This change is backwards compatible with absolute URLs

Bug: T177800
Change-Id: I0254ae8e360f09fe1c786695510550c7fec02026
---
M README.md
M ResourceLoaderLessModule.php
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector 
refs/changes/87/383487/1

diff --git a/README.md b/README.md
index 4b3f40b..85e6ff7 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,8 @@
 its dimensions also need to match the corresponding variable below.
 That in turn may result in blurry images, though.
 
+The URL can be absolute or relative.
+
 Example configuration:
 
        $wgVectorPrintLogo = [
diff --git a/ResourceLoaderLessModule.php b/ResourceLoaderLessModule.php
index a901601..e42b697 100644
--- a/ResourceLoaderLessModule.php
+++ b/ResourceLoaderLessModule.php
@@ -45,7 +45,10 @@
                if ( $printLogo ) {
                        $lessVars[ 'printLogo' ] = true;
                        $lessVars[ 'printLogoUrl' ] = CSSMin::buildUrlValue(
-                               CSSMin::encodeImageAsDataURI( $printLogo['url'] 
) );
+                               CSSMin::encodeImageAsDataURI(
+                                       wfExpandUrl( $printLogo['url'] )
+                               )
+                       );
                        $lessVars[ 'printLogoWidth' ] = intval( 
$printLogo['width'] );
                        $lessVars[ 'printLogoHeight' ] = intval( 
$printLogo['height'] );
                } else {

-- 
To view, visit https://gerrit.wikimedia.org/r/383487
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0254ae8e360f09fe1c786695510550c7fec02026
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Vector
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to