don't try to pull public content from dead sites

This commit is contained in:
redmatrix 2015-11-29 16:28:35 -08:00
parent 9f90806027
commit 302c5afdee

View File

@ -28,7 +28,10 @@ function externals_run($argv, $argc){
} }
else { else {
$randfunc = db_getfunc('RAND'); $randfunc = db_getfunc('RAND');
$r = q("select site_url, site_pull from site where site_url != '%s' and site_flags != %d and site_type = %d order by $randfunc limit 1",
// fixme this query does not deal with directory realms.
$r = q("select site_url, site_pull from site where site_url != '%s' and site_flags != %d and site_type = %d and site_dead = 0 order by $randfunc limit 1",
dbesc(z_root()), dbesc(z_root()),
intval(DIRECTORY_MODE_STANDALONE), intval(DIRECTORY_MODE_STANDALONE),
intval(SITE_TYPE_ZOT) intval(SITE_TYPE_ZOT)