Remove "TODO" on picture display showed on the caddie...

git-svn-id: http://piwigo.org/svn/trunk@1868 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub 2007-03-04 09:36:30 +00:00
commit b72f6620e6
3 changed files with 24 additions and 11 deletions

View file

@ -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)
)
);
}

View file

@ -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,

View file

@ -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.