aboutsummaryrefslogtreecommitdiffstats
path: root/mod/sitelist.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/sitelist.php')
-rw-r--r--mod/sitelist.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/sitelist.php b/mod/sitelist.php
index 95cf862df..95a53c9a4 100644
--- a/mod/sitelist.php
+++ b/mod/sitelist.php
@@ -9,10 +9,11 @@ function sitelist_init(&$a) {
$sql_order = " order by site_url ";
+ $rand = db_getfunc('rand');
if($order == 'random')
- $sql_order = " order by rand() ";
+ $sql_order = " order by $rand ";
- $sql_limit = " limit $start, $limit ";
+ $sql_limit = " LIMIT $limit OFFSET $start ";
$sql_extra = "";
if($open)