aboutsummaryrefslogtreecommitdiffstats
path: root/mod/sitelist.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/sitelist.php')
-rw-r--r--mod/sitelist.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/mod/sitelist.php b/mod/sitelist.php
index 1e6d0fcfb..95cf862df 100644
--- a/mod/sitelist.php
+++ b/mod/sitelist.php
@@ -18,6 +18,12 @@ function sitelist_init(&$a) {
if($open)
$sql_extra = " and site_register = " . intval(REGISTER_OPEN) . " ";
+ $realm = get_directory_realm();
+ if($realm == DIRECTORY_REALM) {
+ $sql_extra .= " and ( site_realm = '" . dbesc($realm) . "' or site_realm = '') ";
+ }
+ else
+ $sql_extra .= " and site_realm = '" . dbesc($realm) . "' ";
$result = array('success' => false);