diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-03-14 17:09:29 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-03-14 17:09:29 +0100 |
commit | 3275c5d6feb683bf4151f7d4867b10431b254d1e (patch) | |
tree | 4fd5e9ecf9165eb1b7cddd3d2bb1ae1330db92ab /inc/media.php | |
parent | 8fcb305db0081dacd8e8ad0583da5ecc6c6837dc (diff) | |
parent | 1359eacbdbff842b241a85ea274a00982fec9267 (diff) | |
download | rpg-3275c5d6feb683bf4151f7d4867b10431b254d1e.tar.gz rpg-3275c5d6feb683bf4151f7d4867b10431b254d1e.tar.bz2 |
Merge branch 'master' into diff_navigation
* master: (103 commits)
Add a basic test case for the cache
Events: Trigger a warning if the default action is not callable
Fix caching (make the event callback public again)
translation update
translation update
translation update
translation update
translation update
translation update
translation update
avoid HTTP image screenshot urls. closes #595
translation update
Extension manager: Fix cache extension to be .repo
adjusted the office type color again
another instance of empty() where an array key might not exist
remove placeholder van denied.txt
updated file icons once more
removed 'not logged in' text, loginform is shown already
Revert "added stripped bit to language file"
fixed index file
...
Conflicts:
inc/html.php
Diffstat (limited to 'inc/media.php')
-rw-r--r-- | inc/media.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/inc/media.php b/inc/media.php index 9d84dc029..2c1a3e8eb 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1019,7 +1019,7 @@ function media_file_tags($meta) { foreach($fields as $key => $tag){ $t = array(); if (!empty($tag[0])) $t = array($tag[0]); - if(is_array($tag[3])) $t = array_merge($t,$tag[3]); + if(isset($tag[3]) && is_array($tag[3])) $t = array_merge($t,$tag[3]); $value = media_getTag($t, $meta); $tags[] = array('tag' => $tag, 'value' => $value); } @@ -1451,10 +1451,10 @@ function media_printfile($item,$auth,$jump,$display_namespace=false){ function media_printicon($filename){ list($ext) = mimetype(mediaFN($filename),false); - if (@file_exists(DOKU_INC.'lib/images/fileicons/'.$ext.'.png')) { - $icon = DOKU_BASE.'lib/images/fileicons/'.$ext.'.png'; + if (@file_exists(DOKU_INC.'lib/images/fileicons/32x32/'.$ext.'.png')) { + $icon = DOKU_BASE.'lib/images/fileicons/32x32/'.$ext.'.png'; } else { - $icon = DOKU_BASE.'lib/images/fileicons/file.png'; + $icon = DOKU_BASE.'lib/images/fileicons/32x32/file.png'; } return '<img src="'.$icon.'" alt="'.$filename.'" class="icon" />'; @@ -1781,7 +1781,7 @@ function media_nstree_item($item){ global $INPUT; $pos = strrpos($item['id'], ':'); $label = substr($item['id'], $pos > 0 ? $pos + 1 : 0); - if(!$item['label']) $item['label'] = $label; + if(empty($item['label'])) $item['label'] = $label; $ret = ''; if (!($INPUT->str('do') == 'media')) @@ -1843,7 +1843,7 @@ function media_resize_image($file, $ext, $w, $h=0){ if( $mtime > filemtime($file) || media_resize_imageIM($ext,$file,$info[0],$info[1],$local,$w,$h) || media_resize_imageGD($ext,$file,$info[0],$info[1],$local,$w,$h) ){ - if($conf['fperm']) @chmod($local, $conf['fperm']); + if(!empty($conf['fperm'])) @chmod($local, $conf['fperm']); return $local; } //still here? resizing failed @@ -1904,7 +1904,7 @@ function media_crop_image($file, $ext, $w, $h=0){ if( $mtime > @filemtime($file) || media_crop_imageIM($ext,$file,$info[0],$info[1],$local,$cw,$ch,$cx,$cy) || media_resize_imageGD($ext,$file,$cw,$ch,$local,$cw,$ch,$cx,$cy) ){ - if($conf['fperm']) @chmod($local, $conf['fperm']); + if(!empty($conf['fperm'])) @chmod($local, $conf['fperm']); return media_resize_image($local,$ext, $w, $h); } |