Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/159372

Change subject: Update path to license footer icons for MW 1.24
......................................................................

Update path to license footer icons for MW 1.24

Bug: 70615
Change-Id: I86ced1df4dd843a83ffa50138bc9356047342bfd
---
M PerPageLicense.php
1 file changed, 16 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PerPageLicense 
refs/changes/72/159372/1

diff --git a/PerPageLicense.php b/PerPageLicense.php
index 4edf36c..ae16280 100644
--- a/PerPageLicense.php
+++ b/PerPageLicense.php
@@ -47,39 +47,49 @@
 
 // Page from which to obtain templates and associated licenses.
 $wgPerPageLicenseTemplatePage = 'MediaWiki:License-templates';
+
+// Path to license files.
+// Needs to be 1.24c because version_compare() works in confusing ways
+if ( version_compare( $wgVersion, '1.24c', '>=' ) ) {
+        $wgPerPageLicensePath = "{$wgScriptPath}/assets/licenses";
+} else {
+        $wgPerPageLicensePath = "{$wgStylePath}/common/images";
+}
+
 // Array of licenses.
 $wgPerPageLicenseLicenses = array (
         'cc-0' => array(
                 'url' => 'http://creativecommons.org/publicdomain/zero/1.0/',
-                'src' => "{$wgStylePath}/common/images/cc-by-sa.png",
+                'src' => "{$wgPerPageLicensePath}/cc-by-sa.png",
                 'alt' => 'Creative Commons 0',
         ),
         'cc-by-nc-sa' => array(
                 'url' => 'http://creativecommons.org/licenses/by-nc/3.0/',
-                'src' => "{$wgStylePath}/common/images/cc-by-nc-sa.png",
+                'src' => "{$wgPerPageLicensePath}/cc-by-nc-sa.png",
                 'alt' => 'Creative Commons Attribution-NonCommercial 3.0 
Unported',
         ),
         'cc-by' => array(
                 'url' => 'http://creativecommons.org/licenses/by/3.0/',
-                'src' => "{$wgStylePath}/common/images/cc-by.png",
+                'src' => "{$wgPerPageLicensePath}/cc-by.png",
                 'alt' => 'Creative Commons Attribution 3.0 Unported',
         ),
         'cc-by-sa' => array(
                 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/',
-                'src' => "{$wgStylePath}/common/images/cc-by-sa.png",
+                'src' => "{$wgPerPageLicensePath}/cc-by-sa.png",
                 'alt' => 'Creative Commons Attribution Share-Alike 3.0 
Unported',
         ),
         'gnu-fdl' => array(
                 'url' => 'http://www.gnu.org/copyleft/fdl.html',
-                'src' => "{$wgStylePath}/common/images/gnu-fdl.png",
+                'src' => "{$wgPerPageLicensePath}/gnu-fdl.png",
                 'alt' => 'GNU Free Documentation License',
         ),
         'public-domain' => array(
                 'url' => 'http://creativecommons.org/licenses/publicdomain/',
-                'src' => "{$wgStylePath}/common/images/public-domain.png",
+                'src' => "{$wgPerPageLicensePath}/public-domain.png",
                 'alt' => 'public domain'
         ),
 );
+
 // Array of namespaces and their licenses.
 $wgPerPageLicenseNamespaces = array();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86ced1df4dd843a83ffa50138bc9356047342bfd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PerPageLicense
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to