diff options
author | friendica <info@friendica.com> | 2011-12-19 00:40:00 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2011-12-19 00:40:00 -0800 |
commit | ad54a91d4df0007892f4c801fa1b3a79466b5bf3 (patch) | |
tree | 1546add0ea51116a33236ee6a13b2587d8221b3f /include/socgraph.php | |
parent | dc46a01cd467ac8c03acda6abcdb3aa56ef2db77 (diff) | |
download | volse-hubzilla-ad54a91d4df0007892f4c801fa1b3a79466b5bf3.tar.gz volse-hubzilla-ad54a91d4df0007892f4c801fa1b3a79466b5bf3.tar.bz2 volse-hubzilla-ad54a91d4df0007892f4c801fa1b3a79466b5bf3.zip |
poco_load aborting after debug statement
Diffstat (limited to 'include/socgraph.php')
-rw-r--r-- | include/socgraph.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/socgraph.php b/include/socgraph.php index 5420b06c8..60bf075d3 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -40,16 +40,28 @@ function poco_load($cid,$uid = 0,$url = null) { if(! $url) return; - logger('poco_load: ' . $url, LOGGER_DATA); + $url = $url . (($uid) ? '/@me/@all?fields=displayName,urls,photos' : '?fields=displayName,urls,photos') ; + logger('poco_load: ' . $url, LOGGER_DEBUG); - $s = fetch_url($url . ($uid) ? '/@me/@all?fields=displayName,urls,photos' : '?fields=displayName,urls,photos' ); + $s = fetch_url($url); + + logger('poco_load: returns ' . $s, LOGGER_DATA); + + logger('poco_load: return code: ' . $a->get_curl_code(), LOGGER_DEBUG); if(($a->get_curl_code() > 299) || (! $s)) return; + + $j = json_decode($s); + + logger('poco_load: json: ' . print_r($j,true),LOGGER_DATA); + + $total = 0; foreach($j->entry as $entry) { + $total ++; $profile_url = ''; $profile_photo = ''; $connect_url = ''; @@ -136,6 +148,7 @@ function poco_load($cid,$uid = 0,$url = null) { } } + logger("poco_load: loaded $total entries",LOGGER_DEBUG); q("delete from glink where `cid` = %d and `uid` = %d and `updated` < UTC_TIMESTAMP - INTERVAL 2 DAY", intval($cid), |