aboutsummaryrefslogtreecommitdiffstats
path: root/include/dir_fns.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-28 17:13:11 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-28 17:13:11 -0700
commite5f47cd14b9dd97385d93c2610e05d959e526ce8 (patch)
tree9863fff105662540bc6e18b8fac5dbb156e5d0f3 /include/dir_fns.php
parentdbeae16dc142c3bc832718b0c29eefd6a82033d6 (diff)
downloadvolse-hubzilla-e5f47cd14b9dd97385d93c2610e05d959e526ce8.tar.gz
volse-hubzilla-e5f47cd14b9dd97385d93c2610e05d959e526ce8.tar.bz2
volse-hubzilla-e5f47cd14b9dd97385d93c2610e05d959e526ce8.zip
create site records for all queued sites and check for death
Diffstat (limited to 'include/dir_fns.php')
-rw-r--r--include/dir_fns.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 38c92dd94..e466b7404 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -151,16 +151,18 @@ function sync_directories($dirmode) {
$realm = get_directory_realm();
if ($realm == DIRECTORY_REALM) {
- $r = q("select * from site where (site_flags & %d) > 0 and site_url != '%s' and ( site_realm = '%s' or site_realm = '') ",
+ $r = q("select * from site where (site_flags & %d) > 0 and site_url != '%s' and site_type = %d and ( site_realm = '%s' or site_realm = '') ",
intval(DIRECTORY_MODE_PRIMARY|DIRECTORY_MODE_SECONDARY),
dbesc(z_root()),
+ intval(SITE_TYPE_ZOT),
dbesc($realm)
);
} else {
- $r = q("select * from site where (site_flags & %d) > 0 and site_url != '%s' and site_realm like '%s' ",
+ $r = q("select * from site where (site_flags & %d) > 0 and site_url != '%s' and site_realm like '%s' and site_type = %d ",
intval(DIRECTORY_MODE_PRIMARY|DIRECTORY_MODE_SECONDARY),
dbesc(z_root()),
- dbesc(protect_sprintf('%' . $realm . '%'))
+ dbesc(protect_sprintf('%' . $realm . '%')),
+ intval(SITE_TYPE_ZOT)
);
}
@@ -187,9 +189,10 @@ function sync_directories($dirmode) {
intval($r[0]['site_valid'])
);
- $r = q("select * from site where (site_flags & %d) > 0 and site_url != '%s'",
+ $r = q("select * from site where (site_flags & %d) > 0 and site_url != '%s' and site_type = %d ",
intval(DIRECTORY_MODE_PRIMARY|DIRECTORY_MODE_SECONDARY),
- dbesc(z_root())
+ dbesc(z_root()),
+ intval(SITE_TYPE_ZOT)
);
}
if (! $r)