diff options
author | marijus <mario@mariovavti.com> | 2014-09-20 17:28:42 +0200 |
---|---|---|
committer | marijus <mario@mariovavti.com> | 2014-09-20 17:28:42 +0200 |
commit | 6c806f6f48fc7efe5fda380f2f9edb9a7dc09cab (patch) | |
tree | 4df2d6e8ed4865850d340b5d9377d27abeaf84fc /include/chat.php | |
parent | bd54358aa6bfe90bfbc8aed7baf3a8110d6e45ba (diff) | |
download | volse-hubzilla-6c806f6f48fc7efe5fda380f2f9edb9a7dc09cab.tar.gz volse-hubzilla-6c806f6f48fc7efe5fda380f2f9edb9a7dc09cab.tar.bz2 volse-hubzilla-6c806f6f48fc7efe5fda380f2f9edb9a7dc09cab.zip |
aalso change the way we check for number of chatrooms
Diffstat (limited to 'include/chat.php')
-rw-r--r-- | include/chat.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/chat.php b/include/chat.php index b8fb185df..5c3d0c9d9 100644 --- a/include/chat.php +++ b/include/chat.php @@ -189,6 +189,17 @@ function chatroom_list($uid) { return $r; } +function chatroom_list_count($uid) { + require_once('include/security.php'); + $sql_extra = permissions_sql($uid); + + $r = q("select count(*) as total from chatroom where cr_uid = %d $sql_extra", + intval($uid) + ); + + return $r[0]['total']; +} + /** * create a chat message via API. * It is the caller's responsibility to enter the room. |