From: Bartosz DziewoƄski Date: Tue, 9 Sep 2014 12:29:57 +0000 (+0200) Subject: Move footer icons to assets/ directory X-Git-Tag: 1.31.0-rc.0~14033^2 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=679bc3040c4290f13cf884c5bee7d9509694999a;p=lhc%2Fweb%2Fwiklou.git Move footer icons to assets/ directory poweredby_mediawiki_88x31.png is straightforward, just need to update some paths. The six license icons are more problematic, as the paths to them are saved in users' LocalSettings. We're remapping them in Setup.php. Bug: 69277 Change-Id: Ic7c32e56043cfbf94ef2271de4ff41ef18fbeee7 --- diff --git a/assets/licenses/cc-0.png b/assets/licenses/cc-0.png new file mode 100644 index 0000000000..9d3fe5f8c9 Binary files /dev/null and b/assets/licenses/cc-0.png differ diff --git a/assets/licenses/cc-by-nc-sa.png b/assets/licenses/cc-by-nc-sa.png new file mode 100644 index 0000000000..0d24a713e7 Binary files /dev/null and b/assets/licenses/cc-by-nc-sa.png differ diff --git a/assets/licenses/cc-by-sa.png b/assets/licenses/cc-by-sa.png new file mode 100644 index 0000000000..518fb64706 Binary files /dev/null and b/assets/licenses/cc-by-sa.png differ diff --git a/assets/licenses/cc-by.png b/assets/licenses/cc-by.png new file mode 100644 index 0000000000..9cca2f92ce Binary files /dev/null and b/assets/licenses/cc-by.png differ diff --git a/assets/licenses/gnu-fdl.png b/assets/licenses/gnu-fdl.png new file mode 100644 index 0000000000..3feaf57f85 Binary files /dev/null and b/assets/licenses/gnu-fdl.png differ diff --git a/assets/licenses/public-domain.png b/assets/licenses/public-domain.png new file mode 100644 index 0000000000..ebf0107288 Binary files /dev/null and b/assets/licenses/public-domain.png differ diff --git a/assets/poweredby_mediawiki_88x31.png b/assets/poweredby_mediawiki_88x31.png new file mode 100644 index 0000000000..30e1d2ea7e Binary files /dev/null and b/assets/poweredby_mediawiki_88x31.png differ diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 6626ab6160..73179cf1a1 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3102,7 +3102,7 @@ $wgFooterIcons = array( ), "poweredby" => array( "mediawiki" => array( - "src" => null, // Defaults to "$wgStylePath/common/images/poweredby_mediawiki_88x31.png" + "src" => null, // Defaults to "$wgScriptPath/assets/poweredby_mediawiki_88x31.png" "url" => "//www.mediawiki.org/", "alt" => "Powered by MediaWiki", ) diff --git a/includes/Setup.php b/includes/Setup.php index cddb30bd4d..0ccbaed0b5 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -102,6 +102,15 @@ if ( $wgGitInfoCacheDirectory === false && $wgCacheDirectory !== false ) { $wgGitInfoCacheDirectory = "{$wgCacheDirectory}/gitinfo"; } +// Fix path to icon images after they were moved in 1.24 +if ( $wgRightsIcon ) { + $wgRightsIcon = str_replace( + "{$wgStylePath}/common/images/", + "{$wgScriptPath}/assets/licenses/", + $wgRightsIcon + ); +} + if ( isset( $wgFooterIcons['copyright'] ) && isset( $wgFooterIcons['copyright']['copyright'] ) && $wgFooterIcons['copyright']['copyright'] === array() @@ -124,7 +133,7 @@ if ( isset( $wgFooterIcons['poweredby'] ) && $wgFooterIcons['poweredby']['mediawiki']['src'] === null ) { $wgFooterIcons['poweredby']['mediawiki']['src'] = - "$wgStylePath/common/images/poweredby_mediawiki_88x31.png"; + "$wgScriptPath/assets/poweredby_mediawiki_88x31.png"; } /** diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 987925c747..544efb6243 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -286,27 +286,27 @@ abstract class Installer { public $licenses = array( 'cc-by' => array( 'url' => 'http://creativecommons.org/licenses/by/3.0/', - 'icon' => '{$wgStylePath}/common/images/cc-by.png', + 'icon' => '{$wgScriptPath}/assets/licenses/cc-by.png', ), 'cc-by-sa' => array( 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/', - 'icon' => '{$wgStylePath}/common/images/cc-by-sa.png', + 'icon' => '{$wgScriptPath}/assets/licenses/cc-by-sa.png', ), 'cc-by-nc-sa' => array( 'url' => 'http://creativecommons.org/licenses/by-nc-sa/3.0/', - 'icon' => '{$wgStylePath}/common/images/cc-by-nc-sa.png', + 'icon' => '{$wgScriptPath}/assets/licenses/cc-by-nc-sa.png', ), 'cc-0' => array( 'url' => 'https://creativecommons.org/publicdomain/zero/1.0/', - 'icon' => '{$wgStylePath}/common/images/cc-0.png', + 'icon' => '{$wgScriptPath}/assets/licenses/cc-0.png', ), 'pd' => array( 'url' => '', - 'icon' => '{$wgStylePath}/common/images/public-domain.png', + 'icon' => '{$wgScriptPath}/assets/licenses/public-domain.png', ), 'gfdl' => array( 'url' => 'http://www.gnu.org/copyleft/fdl.html', - 'icon' => '{$wgStylePath}/common/images/gnu-fdl.png', + 'icon' => '{$wgScriptPath}/assets/licenses/gnu-fdl.png', ), 'none' => array( 'url' => '', diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 7d04b9551f..b4f35839b4 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -827,9 +827,9 @@ abstract class Skin extends ContextSource { * @return string */ function getPoweredBy() { - global $wgStylePath; + global $wgScriptPath; - $url = htmlspecialchars( "$wgStylePath/common/images/poweredby_mediawiki_88x31.png" ); + $url = htmlspecialchars( "$wgScriptPath/assets/poweredby_mediawiki_88x31.png" ); $text = 'Powered by MediaWiki'; wfRunHooks( 'SkinGetPoweredBy', array( &$text, $this ) ); diff --git a/skins/common/images/cc-0.png b/skins/common/images/cc-0.png deleted file mode 100644 index 9d3fe5f8c9..0000000000 Binary files a/skins/common/images/cc-0.png and /dev/null differ diff --git a/skins/common/images/cc-by-nc-sa.png b/skins/common/images/cc-by-nc-sa.png deleted file mode 100644 index 0d24a713e7..0000000000 Binary files a/skins/common/images/cc-by-nc-sa.png and /dev/null differ diff --git a/skins/common/images/cc-by-sa.png b/skins/common/images/cc-by-sa.png deleted file mode 100644 index 518fb64706..0000000000 Binary files a/skins/common/images/cc-by-sa.png and /dev/null differ diff --git a/skins/common/images/cc-by.png b/skins/common/images/cc-by.png deleted file mode 100644 index 9cca2f92ce..0000000000 Binary files a/skins/common/images/cc-by.png and /dev/null differ diff --git a/skins/common/images/gnu-fdl.png b/skins/common/images/gnu-fdl.png deleted file mode 100644 index 3feaf57f85..0000000000 Binary files a/skins/common/images/gnu-fdl.png and /dev/null differ diff --git a/skins/common/images/poweredby_mediawiki_88x31.png b/skins/common/images/poweredby_mediawiki_88x31.png deleted file mode 100644 index 30e1d2ea7e..0000000000 Binary files a/skins/common/images/poweredby_mediawiki_88x31.png and /dev/null differ diff --git a/skins/common/images/public-domain.png b/skins/common/images/public-domain.png deleted file mode 100644 index ebf0107288..0000000000 Binary files a/skins/common/images/public-domain.png and /dev/null differ