From 790c6507d5d9d914f9e9e546256ee2741d6df400 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 5 Aug 2013 20:36:05 -0700 Subject: keep total of imported xchans correct - even if one or mail failures occur --- include/socgraph.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'include/socgraph.php') diff --git a/include/socgraph.php b/include/socgraph.php index d3477a2fe..73ece26ba 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -66,7 +66,6 @@ function poco_load($xchan = '',$url = null) { $total = 0; foreach($j['entry'] as $entry) { - $total ++; $profile_url = ''; $profile_photo = ''; $address = ''; @@ -121,14 +120,18 @@ function poco_load($xchan = '',$url = null) { $x = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1", dbesc($hash) ); - if(! $x) + if(! $x) { continue; - + } } - else + else { continue; + } } + $total ++; + + $r = q("select * from xlink where xlink_xchan = '%s' and xlink_link = '%s' limit 1", dbesc($xchan), dbesc($hash) -- cgit v1.2.3