Skip to content

Commit

Permalink
defer calling flickr_api_call_build
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisaaronland committed Jun 5, 2012
1 parent a30084d commit 646180c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions www/flickr_push_receiver.php
Expand Up @@ -128,15 +128,12 @@

if (($do_push_backups) && ($is_push_backup)){

$method = 'flickr.photos.getInfo';

$args = array(
'photo_id' => $photo_id,
'auth_token' => $flickr_user['auth_token'],
);

$api_call = flickr_api_call_build($method, $args);
$to_backup[] = $api_call;
$to_backup[] = $args;
}

if ($rsp['ok']){
Expand Down Expand Up @@ -237,9 +234,10 @@
loadlib("http");
$reqs = array();

foreach ($to_backup as $api_call){
foreach ($to_backup as $args){

list($url, $args) = flickr_api_call_build('flickr.photos.getInfo', $args);

list($url, $args) = $api_call;
$url = $url . "?" . http_build_query($args);

$reqs[] = array(
Expand Down

0 comments on commit 646180c

Please sign in to comment.