aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-03-04 09:36:30 +0000
committerrub <rub@piwigo.org>2007-03-04 09:36:30 +0000
commitb72f6620e664e321815433adcb3f9ed9ff771a43 (patch)
tree87c779711fbfe62c5f3236794105168ddc546893 /include
parent44f057a5f0689ad05d1ac6bf4f6f4249048ac1a2 (diff)
Remove "TODO" on picture display showed on the caddie...
git-svn-id: http://piwigo.org/svn/trunk@1868 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-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.