= ($limit -1)) return $r; $r2 = q("SELECT gcontact.* from gcontact left join glink on glink.gcid = gcontact.id where glink.uid = 0 and glink.cid = 0 and glink.zcid = 0 and not gcontact.nurl in ( select nurl from contact where uid = %d ) and not gcontact.name in ( select name from contact where uid = %d ) and not gcontact.id in ( select gcid from gcign where uid = %d ) order by rand() limit %d, %d ", intval($uid), intval($uid), intval($uid), intval($start), intval($limit) ); return array_merge($r,$r2); */ } function update_suggestions() { // FIXME return; $a = get_app(); $done = array(); // fix this to get a json list from an upstream directory // poco_load(0,0,0,$a->get_baseurl() . '/poco'); // $done[] = $a->get_baseurl() . '/poco'; // if(strlen(get_config('system','directory_submit_url'))) { // $x = fetch_url('http://dir.friendica.com/pubsites'); // if($x) { // $j = json_decode($x); // if($j->entries) { // foreach($j->entries as $entry) { // $url = $entry->url . '/poco'; // if(! in_array($url,$done)) // poco_load(0,0,0,$entry->url . '/poco'); // } // } // } // } $r = q("select distinct(xchan_connurl) as poco from xchan where xchan_network = 'zot'"); if($r) { foreach($r as $rr) { $base = substr($rr['poco'],0,strrpos($rr['poco'],'/')); if(! in_array($base,$done)) poco_load('',$base); } } }