aboutsummaryrefslogtreecommitdiffstats
path: root/include/chat.php
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2014-08-18 18:55:18 +0200
committerPaolo T <tuscanhobbit@users.noreply.github.com>2014-08-18 18:55:18 +0200
commitb5d1c7865b14fa60c35618b4179eb3c91949a441 (patch)
tree38ddb2fcab0f4c2c3baf6917e3544148cbe1eb9e /include/chat.php
parent3b979dd2a9f8bb8f569c234408d02dfd1e7039d7 (diff)
parentd9ff121930554aa9bcad4f4ceffeb9b5e3b83d17 (diff)
downloadvolse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.tar.gz
volse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.tar.bz2
volse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.zip
Merge pull request #1 from friendica/master
Red master has been merged
Diffstat (limited to 'include/chat.php')
-rw-r--r--include/chat.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/chat.php b/include/chat.php
index 9d2341dfa..5f69853e7 100644
--- a/include/chat.php
+++ b/include/chat.php
@@ -119,10 +119,10 @@ function chatroom_enter($observer_xchan,$room_id,$status,$client) {
$limit = service_class_fetch($r[0]['cr_uid'],'chatters_inroom');
if($limit !== false) {
- $x = q("select count(*) as total from chatpresence where cp_room = %d",
+ $y = q("select count(*) as total from chatpresence where cp_room = %d",
intval($room_id)
);
- if($x && $x[0]['total'] > $limit) {
+ if($y && $y[0]['total'] > $limit) {
notice( t('Room is full') . EOL);
return false;
}
@@ -235,6 +235,8 @@ function chat_message($uid,$room_id,$xchan,$text) {
*/
function chatroom_flush($room_id,$xchan) {
+
+
$date_limit = date('Y-m-d H:i:s', time() - 3600 * MAX_CHATROOM_HOURS);
$d = q("delete from chat where chat_room = %d and chat_xchan = '%s' and created < '%s'",
intval($room_id),