Added Tagging, Moving with Replace, Optimised Delete
This commit is contained in:
@@ -13,6 +13,8 @@ class Task_Photo_Move extends Minion_Task {
|
||||
protected $_options = array(
|
||||
'file'=>NULL, // Photo File to Move
|
||||
'batch'=>NULL, // Number of photos to move in a batch
|
||||
'useid'=>TRUE, // If date not in photo use ID
|
||||
'verbose'=>FALSE, // Show some debuggig
|
||||
);
|
||||
|
||||
protected function _execute(array $params) {
|
||||
@@ -33,9 +35,12 @@ class Task_Photo_Move extends Minion_Task {
|
||||
|
||||
$c = 0;
|
||||
foreach ($p->find_all() as $po) {
|
||||
if ($po->file_path() == $po->file_path(FALSE,TRUE))
|
||||
if ($po->file_path() == $po->file_path(FALSE,($params['useid'] OR $po->date_taken) ? TRUE : FALSE))
|
||||
continue;
|
||||
|
||||
if ($params['verbose'])
|
||||
printf("Processing [%s], file [%s] - newpath [%s]\n",$po->id,$po->file_path(),$po->file_path(FALSE,($params['useid'] OR $po->date_taken) ? TRUE : FALSE));
|
||||
|
||||
if ($po->move())
|
||||
printf("Photo [%s] moved to %s.\n",$po->id,$po->file_path());
|
||||
else
|
||||
|
Reference in New Issue
Block a user