From 4a76925787672ede57e0d36c890ffb08b6d32ed4 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 17 Aug 2014 19:06:56 -0700 Subject: some more work on realms --- mod/sitelist.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mod/sitelist.php') 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); -- cgit v1.2.3