summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-01-06 09:46:08 +0100
committerAndreas Unterkircher <unki@netshadow.at>2008-01-06 09:46:08 +0100
commit1a39ed73420a13f0728360a186a5c140a7d852ee (patch)
tree5845f37c3e9080d1509cebb1c71355357b37b249 /phpfspot.class.php
parenta8c8bd8ee5c29db5512230eaeb65e44794e21b89 (diff)
issue92, fill alt-attribute with filename
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php39
1 files changed, 19 insertions, 20 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 0ce7393..b9ed198 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -472,30 +472,29 @@ class PHPFSPOT {
$this->tmpl->assign('extern_link', $extern_link);
- if(file_exists($thumb_path)) {
+ if(!file_exists($thumb_path)) {
+ $this->_error("Can't open file ". $thumb_path ."\n");
+ return;
+ }
- $info = getimagesize($thumb_path);
+ $info = getimagesize($thumb_path);
- $this->tmpl->assign('description', $details['description']);
- $this->tmpl->assign('image_name', $this->parse_uri($details['uri'], 'filename'));
+ $this->tmpl->assign('description', $details['description']);
+ $this->tmpl->assign('image_name', $this->parse_uri($details['uri'], 'filename'));
- $this->tmpl->assign('width', $info[0]);
- $this->tmpl->assign('height', $info[1]);
- $this->tmpl->assign('ExifMadeOn', $meta_date);
- $this->tmpl->assign('ExifMadeWith', $meta_make);
- $this->tmpl->assign('ExifOrigResolution', $meta_res);
- $this->tmpl->assign('ExifFileSize', $meta_size);
-
- $this->tmpl->assign('image_url', 'phpfspot_img.php?idx='. $photo ."&amp;width=". $this->cfg->photo_width);
- $this->tmpl->assign('image_url_full', 'phpfspot_img.php?idx='. $photo);
+ $this->tmpl->assign('width', $info[0]);
+ $this->tmpl->assign('height', $info[1]);
+ $this->tmpl->assign('ExifMadeOn', $meta_date);
+ $this->tmpl->assign('ExifMadeWith', $meta_make);
+ $this->tmpl->assign('ExifOrigResolution', $meta_res);
+ $this->tmpl->assign('ExifFileSize', $meta_size);
+
+ $this->tmpl->assign('image_url', 'phpfspot_img.php?idx='. $photo ."&amp;width=". $this->cfg->photo_width);
+ $this->tmpl->assign('image_url_full', 'phpfspot_img.php?idx='. $photo);
+ $this->tmpl->assign('image_filename', $this->parse_uri($details['uri'], 'filename'));
- $this->tmpl->assign('tags', $this->get_photo_tags($photo));
- $this->tmpl->assign('current', $current);
- }
- else {
- $this->_error("Can't open file ". $thumb_path ."\n");
- return;
- }
+ $this->tmpl->assign('tags', $this->get_photo_tags($photo));
+ $this->tmpl->assign('current', $current);
if($previous_img) {
$this->tmpl->assign('previous_url', "javascript:showImage(". $previous_img .");");