diff options
author | Kate Arzamastseva <pshns@ukr.net> | 2011-06-29 16:59:18 +0300 |
---|---|---|
committer | Kate Arzamastseva <pshns@ukr.net> | 2011-06-29 16:59:18 +0300 |
commit | 3e98e6857f2c48127d4169d02e341d1013c00bac (patch) | |
tree | aeb8ee75d550d15dea7283fa51aaf1f225767fb4 /lib | |
parent | e18ba5797b635bf97755910093c3eed1f9667362 (diff) | |
download | rpg-3e98e6857f2c48127d4169d02e341d1013c00bac.tar.gz rpg-3e98e6857f2c48127d4169d02e341d1013c00bac.tar.bz2 |
media getting metadata fix
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tpl/default/detail.php | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/lib/tpl/default/detail.php b/lib/tpl/default/detail.php index f61ede043..f7bb37a25 100644 --- a/lib/tpl/default/detail.php +++ b/lib/tpl/default/detail.php @@ -52,25 +52,20 @@ if (!defined('DOKU_INC')) die(); <dl class="img_tags"> <?php - static $tags = null; - if(is_null($tags)){ - foreach (array('default','local') as $config_group) { - if (empty($config_cascade['mediameta'][$config_group])) continue; - foreach ($config_cascade['mediameta'][$config_group] as $config_file) { - if(@file_exists($config_file)){ - include($config_file); - } - } - } + $config_files = getConfigFiles('mediameta'); + foreach ($config_files as $config_file) { + if(@file_exists($config_file)) include($config_file); } - foreach($tags as $key => $tag){ - $t = $tag[0]; - if (!is_array($t)) $t = array($tag[0]); + + 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]); $value = tpl_img_getTag($t); if ($value) { echo '<dt>'.$lang[$tag[1]].':</dt><dd>'; - if ($tag[2] == 'text') echo hsc($value); if ($tag[2] == 'date') echo dformat($value); + else echo hsc($value); echo '</dd>'; } } |