following random feeds

This commit is contained in:
Friendika 2011-01-23 20:09:34 -08:00
commit 5be98e3ec8
3 changed files with 91 additions and 3 deletions

View file

@ -32,10 +32,18 @@
if(($argc > 1) && ($argv[1] == 'force'))
$force = true;
if(($argc > 1) && intval($argv[1])) {
$manual_id = intval($argv[1]);
$force = true;
}
$sql_extra = (($manual_id) ? " AND `id` = $manual_id " : "");
// 'stat' clause is a temporary measure until we have federation subscriptions working both directions
$contacts = q("SELECT * FROM `contact`
WHERE ( ( `network` = 'dfrn' AND ( `dfrn-id` != '' OR (`issued-id` != '' AND `duplex` = 1)))
OR ( `network` IN ( 'stat', 'feed' ) AND `poll` != '' ))
OR ( `network` IN ( 'stat', 'feed' ) AND `poll` != '' ))
$sql_extra
AND `self` = 0 AND `blocked` = 0 AND `readonly` = 0 ORDER BY RAND()");
if(! count($contacts))