Move file type icons to new assets/ directory
This patch introduces the assets/ directory, which will be used for static files included with MediaWiki that can't meaningfully be loaded via ResourceLoader. Bug: 69277 Change-Id: Ifd87387f20a6355a6e273628b37735c207e4c53a
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 803 B After Width: | Height: | Size: 803 B |
|
Before Width: | Height: | Size: 7 KiB After Width: | Height: | Size: 7 KiB |
|
Before Width: | Height: | Size: 6 KiB After Width: | Height: | Size: 6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 789 B After Width: | Height: | Size: 789 B |
|
|
@ -1312,16 +1312,16 @@ abstract class File {
|
|||
* @return ThumbnailImage
|
||||
*/
|
||||
function iconThumb() {
|
||||
global $wgStylePath, $wgStyleDirectory;
|
||||
global $wgScriptPath, $IP;
|
||||
$assetsPath = "$wgScriptPath/assets/file-type-icons/";
|
||||
$assetsDirectory = "$IP/assets/file-type-icons/";
|
||||
|
||||
$try = array( 'fileicon-' . $this->getExtension() . '.png', 'fileicon.png' );
|
||||
foreach ( $try as $icon ) {
|
||||
$path = '/common/images/icons/' . $icon;
|
||||
$filepath = $wgStyleDirectory . $path;
|
||||
if ( file_exists( $filepath ) ) { // always FS
|
||||
if ( file_exists( $assetsDirectory . $icon ) ) { // always FS
|
||||
$params = array( 'width' => 120, 'height' => 120 );
|
||||
|
||||
return new ThumbnailImage( $this, $wgStylePath . $path, false, $params );
|
||||
return new ThumbnailImage( $this, $assetsPath . $icon, false, $params );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||