summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-12-30 12:19:13 +0100
committerAndreas Unterkircher <unki@netshadow.at>2007-12-30 13:45:37 +0100
commit431b2c5f99629be3a4d311ce07f9a7d7ebf96375 (patch)
tree339f45ce1603219727c36872354bec941e28048a /phpfspot.class.php
parent18ff7e0419aebe37fcebdbfb180550acb118c0cb (diff)
add a "already exist" when thumbnails are created on the command line. without it looked like an error occured
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index ea91b01..5e64117 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -1290,6 +1290,8 @@ class PHPFSPOT {
$this->_debug("Image [". $idx ."] ". $this->shrink_text($this->parse_uri($details['uri'], 'filename'), 20) ." Thumbnails:");
+ $changes = false;
+
foreach($resolutions as $resolution) {
$thumb_sub_path = substr($file_md5, 0, 2);
@@ -1305,6 +1307,8 @@ class PHPFSPOT {
$this->_debug(" ". $resolution ."px");
if(!$this->create_thumbnail($full_path, $thumb_path, $resolution))
$error = 1;
+
+ $changes = true;
}
/* if the file hasn't changed there is no need to regen the thumb */
elseif($file_md5 != $this->getMD5($idx) || $force) {
@@ -1313,9 +1317,14 @@ class PHPFSPOT {
if(!$this->create_thumbnail($full_path, $thumb_path, $resolution))
$error = 1;
+ $changes = true;
}
}
+ if(!$changes) {
+ $this->_debug(" already exist");
+ }
+
/* set the new/changed MD5 sum for the current photo */
if(!$error) {
$this->setMD5($idx, $file_md5);