summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-07-15 09:19:50 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-07-15 09:19:50 +0000
commita552181a7fe679d8aebc24d75f61dcfe445b9f04 (patch)
treed77eea0afa268c59c36cc6d65c8f4b3be1b10a66 /phpfspot.class.php
parenta63f899582afffadbabfdf422489b7937f0e6a1e (diff)
issue43, fixed on-the-fly thumbnail generation
git-svn-id: file:///var/lib/svn/phpfspot/trunk@207 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 579054d..7d58ffe 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -191,6 +191,12 @@ class PHPFSPOT {
}
$details = $this->get_photo_details($photo);
+
+ if(!$details) {
+ print "error";
+ return;
+ }
+
$orig_path = $this->translate_path($details['directory_path']) ."/". $details['name'];
$thumb_path = $this->cfg->base_path ."/thumbs/". $this->cfg->photo_width ."_". $this->getMD5($photo);
@@ -205,6 +211,7 @@ class PHPFSPOT {
/* If the thumbnail doesn't exist yet, try to create it */
if(!file_exists($thumb_path)) {
$this->gen_thumb($photo, true);
+ $thumb_path = $this->cfg->base_path ."/thumbs/". $this->cfg->photo_width ."_". $this->getMD5($photo);
}
$meta = $this->get_meta_informations($orig_path);
@@ -254,6 +261,7 @@ class PHPFSPOT {
}
else {
$this->_warning("Can't open file ". $thumb_path ."\n");
+ return;
}
if($previous_img) {