aboutsummaryrefslogtreecommitdiffstats
path: root/include/dir_fns.php
diff options
context:
space:
mode:
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)