aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-08-26 12:24:32 +0000
committerplegall <plg@piwigo.org>2011-08-26 12:24:32 +0000
commit37156b505325bcc326f83f36ed28aebb909a12be (patch)
treed70b4cfc4883985bea9a8efc6c74d2e1417e4779 /include
parent540c1d5aa0eadcab446f6e71b5b25f8c9c165ac4 (diff)
feature 1797 added: use photo title for thumbnail ALT attribute if possible
git-svn-id: http://piwigo.org/svn/trunk@11999 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/category_default.inc.php13
1 files changed, 2 insertions, 11 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index 1133c2b00..ef04324f7 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -113,7 +113,7 @@ foreach ($pictures as $row)
array(
'ID' => $row['id'],
'TN_SRC' => get_thumbnail_url($row),
- 'TN_ALT' => $row['file'],
+ 'TN_ALT' => htmlspecialchars(strip_tags(get_picture_title($row))),
'TN_TITLE' => get_thumbnail_title($row),
'URL' => $url,
@@ -141,16 +141,7 @@ foreach ($pictures as $row)
$tpl_var['NB_HITS'] = $row['hit'];
}
- if (isset($row['name']) and $row['name'] != '')
- {
- $name = $row['name'];
- }
- else
- {
- $name = str_replace('_', ' ', get_filename_wo_extension($row['file']));
- }
-
- $name = trigger_event('render_element_description', $name);
+ $name = trigger_event('render_element_description', get_picture_title($row));
switch ($page['section'])
{