projects
/
phpfspot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
04b321f
)
add a "already exist" when thumbnails are created on the command line. without it...
author
Andreas Unterkircher
<unki@netshadow.at>
Sun, 30 Dec 2007 11:19:13 +0000
(12:19 +0100)
committer
Andreas Unterkircher
<unki@netshadow.at>
Sun, 30 Dec 2007 11:19:13 +0000
(12:19 +0100)
phpfspot.class.php
patch
|
blob
|
history
diff --git
a/phpfspot.class.php
b/phpfspot.class.php
index e2b24a861b6296589511f8487c05c112e1af721f..841da503f46454bb9ac38c458172b9c13d123e44 100644
(file)
--- a/
phpfspot.class.php
+++ b/
phpfspot.class.php
@@
-1269,6
+1269,8
@@
class PHPFSPOT {
$this->_debug("Image [". $idx ."] ". $this->shrink_text($details['name'], 20) ." Thumbnails:");
$this->_debug("Image [". $idx ."] ". $this->shrink_text($details['name'], 20) ." Thumbnails:");
+ $changes = false;
+
foreach($resolutions as $resolution) {
$thumb_sub_path = substr($file_md5, 0, 2);
foreach($resolutions as $resolution) {
$thumb_sub_path = substr($file_md5, 0, 2);
@@
-1284,6
+1286,8
@@
class PHPFSPOT {
$this->_debug(" ". $resolution ."px");
if(!$this->create_thumbnail($full_path, $thumb_path, $resolution))
$error = 1;
$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) {
}
/* if the file hasn't changed there is no need to regen the thumb */
elseif($file_md5 != $this->getMD5($idx) || $force) {
@@
-1292,9
+1296,14
@@
class PHPFSPOT {
if(!$this->create_thumbnail($full_path, $thumb_path, $resolution))
$error = 1;
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);
/* set the new/changed MD5 sum for the current photo */
if(!$error) {
$this->setMD5($idx, $file_md5);