aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/chat.php2
-rw-r--r--include/widgets.php4
-rw-r--r--mod/sitelist.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/chat.php b/include/chat.php
index 533c03dde..b19d495bb 100644
--- a/include/chat.php
+++ b/include/chat.php
@@ -185,7 +185,7 @@ function chatroom_list($uid) {
require_once('include/security.php');
$sql_extra = permissions_sql($uid);
- $r = q("select cr_name, cr_id, count(cp_id) as cr_inroom from chatroom left join chatpresence on cr_id = cp_room where cr_uid = %d $sql_extra group by cr_name order by cr_name",
+ $r = q("select cr_name, cr_id, count(cp_id) as cr_inroom from chatroom left join chatpresence on cr_id = cp_room where cr_uid = %d $sql_extra group by cr_name, cr_id order by cr_name",
intval($uid)
);
diff --git a/include/widgets.php b/include/widgets.php
index 9f9268055..3533e2cea 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -642,7 +642,7 @@ function widget_bookmarkedchats($arr) {
$h = get_observer_hash();
if(! $h)
return;
- $r = q("select * from xchat where xchat_xchan = '%s' group by xchat_url order by xchat_desc",
+ $r = q("select xchat_url, xchat_desc from xchat where xchat_xchan = '%s' order by xchat_desc",
dbesc($h)
);
if($r) {
@@ -664,7 +664,7 @@ function widget_suggestedchats($arr) {
$h = get_observer_hash();
if(! $h)
return;
- $r = q("select *, count(xchat_url) as total from xchat group by xchat_url order by total desc, xchat_desc limit 24");
+ $r = q("select xchat_url, xchat_desc, count(xchat_xchan) as total from xchat group by xchat_url, xchat_desc order by total desc, xchat_desc limit 24");
if($r) {
for($x = 0; $x < count($r); $x ++) {
$r[$x]['xchat_url'] = zid($r[$x]['xchat_url']);
diff --git a/mod/sitelist.php b/mod/sitelist.php
index 95a53c9a4..12911cbd4 100644
--- a/mod/sitelist.php
+++ b/mod/sitelist.php
@@ -28,7 +28,7 @@ function sitelist_init(&$a) {
$result = array('success' => false);
- $r = q("select count(site_url) as total from site where 1 $sql_extra ");
+ $r = q("select count(site_url) as total from site where true $sql_extra ");
if($r)
$result['total'] = intval($r[0]['total']);