diff options
author | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-08-18 18:55:18 +0200 |
---|---|---|
committer | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-08-18 18:55:18 +0200 |
commit | b5d1c7865b14fa60c35618b4179eb3c91949a441 (patch) | |
tree | 38ddb2fcab0f4c2c3baf6917e3544148cbe1eb9e /mod/dirsearch.php | |
parent | 3b979dd2a9f8bb8f569c234408d02dfd1e7039d7 (diff) | |
parent | d9ff121930554aa9bcad4f4ceffeb9b5e3b83d17 (diff) | |
download | volse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.tar.gz volse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.tar.bz2 volse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.zip |
Merge pull request #1 from friendica/master
Red master has been merged
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r-- | mod/dirsearch.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php index 0ace4ecae..b72d303b7 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -325,8 +325,18 @@ function dir_parse_query($s) { function list_public_sites() { - - $r = q("select * from site where site_access != 0 and site_register !=0 order by rand()"); + $realm = get_directory_realm(); + if($realm == DIRECTORY_REALM) { + $r = q("select * from site where site_access != 0 and site_register !=0 and ( site_realm = '%s' or site_realm = '') order by rand()", + dbesc($realm) + ); + } + else { + $r = q("select * from site where site_access != 0 and site_register !=0 and site_realm = '%s' order by rand()", + dbesc($realm) + ); + } + $ret = array('success' => false); if($r) { |