Move default logo to resources/assets/ directory
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 18 Sep 2014 11:01:33 +0000 (13:01 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sat, 20 Sep 2014 20:45:50 +0000 (20:45 +0000)
The problem here is that the path to 'wiki.png' is saved in users'
LocalSettings.

We likely should not remap the path, like we did for footer license
icons in Ic7c32e56:

* It's likely that users changed their logo image by overwriting the
  file in skins/common/.
* If the normal upgrade process is followed (overwrite-uploading new
  files), the old file will still be there with the skins/common/
  directory.
* If it does cause problems, they'll be rather easy to notice and fix.

On the other hand, maybe we should?

* This is going to be annoying for git users.
* It will bite anyone who deletes all MediaWiki files when upgrading
  via tarball, which is more likely with the recent skin system
  changes encouraging users to remove old cruft from skins/ directory.

Bug: 69277
Change-Id: I175fe57048ebf9d348fb2fe67bf62cf5df389003

includes/DefaultSettings.php
includes/Setup.php
includes/installer/Installer.php
resources/assets/wiki.png [new file with mode: 0644]
skins/common/images/wiki.png [deleted file]

index 9ec47f2..b696c84 100644 (file)
@@ -253,7 +253,7 @@ $wgFileCacheDirectory = false;
 
 /**
  * The URL path of the wiki logo. The logo size should be 135x135 pixels.
- * Defaults to "{$wgStylePath}/common/images/wiki.png".
+ * Defaults to "$wgResourceBasePath/resources/assets/wiki.png".
  */
 $wgLogo = false;
 
index 253d25b..7a89c7a 100644 (file)
@@ -82,7 +82,7 @@ if ( $wgResourceBasePath === null ) {
 }
 
 if ( $wgLogo === false ) {
-       $wgLogo = "$wgStylePath/common/images/wiki.png";
+       $wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
 }
 
 if ( $wgUploadPath === false ) {
index f84ed00..86c3651 100644 (file)
@@ -225,7 +225,7 @@ abstract class Installer {
 
                // $wgLogo is probably wrong (bug 48084); set something that will work.
                // Single quotes work fine here, as LocalSettingsGenerator outputs this unescaped.
-               'wgLogo' => '$wgStylePath/common/images/wiki.png',
+               'wgLogo' => '$wgScriptPath/resources/assets/wiki.png',
        );
 
        /**
diff --git a/resources/assets/wiki.png b/resources/assets/wiki.png
new file mode 100644 (file)
index 0000000..48595b0
Binary files /dev/null and b/resources/assets/wiki.png differ
diff --git a/skins/common/images/wiki.png b/skins/common/images/wiki.png
deleted file mode 100644 (file)
index 48595b0..0000000
Binary files a/skins/common/images/wiki.png and /dev/null differ