aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--admin/element_set_global.php6
-rw-r--r--include/category_default.inc.php9
-rw-r--r--include/functions.inc.php20
3 files changed, 24 insertions, 11 deletions
diff --git a/admin/element_set_global.php b/admin/element_set_global.php
index cb55282e2..ad1ff8135 100644
--- a/admin/element_set_global.php
+++ b/admin/element_set_global.php
@@ -369,7 +369,7 @@ if (count($page['cat_elements_id']) > 0)
$template->assign_vars(array('NAV_BAR' => $nav_bar));
$query = '
-SELECT id,path,tn_ext
+SELECT id,path,tn_ext,file,filesize
FROM '.IMAGES_TABLE.'
WHERE id IN ('.implode(',', $page['cat_elements_id']).')
'.$conf['order_by'].'
@@ -393,8 +393,8 @@ SELECT id,path,tn_ext
array(
'ID' => $row['id'],
'SRC' => $src,
- 'ALT' => 'TODO',
- 'TITLE' => 'TODO'
+ 'ALT' => $row['file'],
+ 'TITLE' => get_thumbnail_title($row)
)
);
}
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.