aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dirsearch.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-23 21:49:48 -0800
committerfriendica <info@friendica.com>2015-01-23 21:49:48 -0800
commit34b5072ccf6a9aea2198878767c5f489404a1bd2 (patch)
tree198101f72fe89aa434611bf2e4e363f08f28822e /mod/dirsearch.php
parentbefe77a93f305c56db2f96604fabebaec6399cb9 (diff)
parent0405f2bcb973118e6567fd44a7994aa06f54fe7a (diff)
downloadvolse-hubzilla-34b5072ccf6a9aea2198878767c5f489404a1bd2.tar.gz
volse-hubzilla-34b5072ccf6a9aea2198878767c5f489404a1bd2.tar.bz2
volse-hubzilla-34b5072ccf6a9aea2198878767c5f489404a1bd2.zip
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r--mod/dirsearch.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index 4a44feb7d..06d530849 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -355,14 +355,15 @@ function dir_parse_query($s) {
function list_public_sites() {
+ $rand = db_getfunc('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()",
+ $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()",
+ $r = q("select * from site where site_access != 0 and site_register !=0 and site_realm = '%s' order by $rand",
dbesc($realm)
);
}