From 0130c2a3c0f0c41f80ae64c6ea458ed8ef791ad7 Mon Sep 17 00:00:00 2001 From: straup Date: Thu, 8 Dec 2011 12:45:32 +0100 Subject: [PATCH] actually set date_firstupdate correctly....duh --- www/include/lib_flickr_backups.php | 9 +++++---- www/include/lib_flickr_photos_import.php | 15 --------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/www/include/lib_flickr_backups.php b/www/include/lib_flickr_backups.php index 499c9a2..dee607a 100644 --- a/www/include/lib_flickr_backups.php +++ b/www/include/lib_flickr_backups.php @@ -148,10 +148,6 @@ function flickr_backups_get_photos(&$user){ if (! $backup['date_firstupdate']){ $rsp = flickr_photos_import_for_nsid($flickr_user['nsid']); - - if ($rsp['ok']){ - $update['date_firstupdate'] = $update['date_lastupdate']; - } } else { @@ -168,6 +164,11 @@ function flickr_backups_get_photos(&$user){ if ($rsp['ok']){ $update['date_lastupdate'] = $start_time; $update['details'] = "count: {$rsp['count_imported']}"; + + if (! $backup['date_firstupdate']){ + $update['date_firstupdate'] = $update['date_lastupdate']; + } + } else { diff --git a/www/include/lib_flickr_photos_import.php b/www/include/lib_flickr_photos_import.php index 6471642..fb6171c 100644 --- a/www/include/lib_flickr_photos_import.php +++ b/www/include/lib_flickr_photos_import.php @@ -158,21 +158,6 @@ function flickr_photos_import_photo($photo, $more=array()){ function flickr_photos_import_photo_files(&$photo, $more=array()){ - # FIX ME: OMGWTF... -/* -
'wrote
-/home/asc/parallel-flickr-static/556/556_8e34a729d6_i.json'
-
'fetching 1 URIs for photo '
-
'failed to fetch
-http://farm1.static.flickr.com/1/556_8e34a729d6_o.:  will retry: 1'
-
'fetching 1 URIs for photo '
-
'failed to fetch
-http://farm1.static.flickr.com/1/556_8e34a729d6_o.:  will retry: 1'
-
'fetching 1 URIs for photo '
-
'failed to fetch
-http://farm1.static.flickr.com/1/556_8e34a729d6_o.:  will retry: 0'
-*/ - $root = "http://farm{$photo['farm']}.static.flickr.com/{$photo['server']}/{$photo['id']}"; $small = "{$root}_{$photo['secret']}_z.jpg";