aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/category_default.inc.php9
-rw-r--r--include/functions.inc.php20
2 files changed, 21 insertions, 8 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index 19a8d7633..48e16fa95 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -74,13 +74,6 @@ foreach ($pictures as $row)
{
$thumbnail_url = get_thumbnail_url($row);
- // message in title for the thumbnail
- $thumbnail_title = $row['file'];
- if (isset($row['filesize']))
- {
- $thumbnail_title .= ' : '.$row['filesize'].' KB';
- }
-
// link on picture.php page
$url = duplicate_picture_url(
array(
@@ -95,7 +88,7 @@ foreach ($pictures as $row)
array(
'IMAGE' => $thumbnail_url,
'IMAGE_ALT' => $row['file'],
- 'IMAGE_TITLE' => $thumbnail_title,
+ 'IMAGE_TITLE' => get_thumbnail_title($row),
'IMAGE_TS' => get_icon($row['date_available']),
'U_IMG_LINK' => $url,
diff --git a/include/functions.inc.php b/include/functions.inc.php
index eb706e6ba..5990b1f68 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -819,6 +819,26 @@ function get_thumbnail_location($element_info)
return $path;
}
+/* returns the title of the thumnail */
+function get_thumbnail_title($element_info)
+{
+ // message in title for the thumbnail
+ if (isset($element_info['file']))
+ {
+ $thumbnail_title = $element_info['file'];
+ }
+ else
+ {
+ $thumbnail_title = '';
+ }
+
+ if (!empty($element_info['filesize']))
+ {
+ $thumbnail_title .= ' : '.$element_info['filesize'].' KB';
+ }
+
+ return $thumbnail_title;
+}
// my_error returns (or send to standard output) the message concerning the
// error occured for the last mysql query.