aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dirsearch.php
diff options
context:
space:
mode:
authorHabeas Codice <habeascodice@federated.social>2015-01-23 17:25:05 -0800
committerHabeas Codice <habeascodice@federated.social>2015-01-23 17:25:05 -0800
commit891d231bbe4ee4499cf9e62013971b85a0542404 (patch)
treeae10b2b15e10ebe63bb3ce24ccff1269f62b2c26 /mod/dirsearch.php
parent660ed058bf719a4545c569712a0b9244f127cc18 (diff)
downloadvolse-hubzilla-891d231bbe4ee4499cf9e62013971b85a0542404.tar.gz
volse-hubzilla-891d231bbe4ee4499cf9e62013971b85a0542404.tar.bz2
volse-hubzilla-891d231bbe4ee4499cf9e62013971b85a0542404.zip
rand() fixes
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)
);
}