sql error
This commit is contained in:
parent
ca5992fade
commit
a1ffb5ee72
@ -119,10 +119,10 @@ function chatroom_enter($observer_xchan,$room_id,$status,$client) {
|
|||||||
|
|
||||||
$limit = service_class_fetch($r[0]['cr_uid'],'chatters_inroom');
|
$limit = service_class_fetch($r[0]['cr_uid'],'chatters_inroom');
|
||||||
if($limit !== false) {
|
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)
|
intval($room_id)
|
||||||
);
|
);
|
||||||
if($x && $x[0]['total'] > $limit) {
|
if($y && $y[0]['total'] > $limit) {
|
||||||
notice( t('Room is full') . EOL);
|
notice( t('Room is full') . EOL);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -235,6 +235,8 @@ function chat_message($uid,$room_id,$xchan,$text) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function chatroom_flush($room_id,$xchan) {
|
function chatroom_flush($room_id,$xchan) {
|
||||||
|
|
||||||
|
|
||||||
$date_limit = date('Y-m-d H:i:s', time() - 3600 * MAX_CHATROOM_HOURS);
|
$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'",
|
$d = q("delete from chat where chat_room = %d and chat_xchan = '%s' and created < '%s'",
|
||||||
intval($room_id),
|
intval($room_id),
|
||||||
|
@ -79,7 +79,7 @@ function categories_widget($baseurl,$selected = '') {
|
|||||||
and term.uid = item.uid
|
and term.uid = item.uid
|
||||||
and term.type = %d
|
and term.type = %d
|
||||||
and item.author_xchan = '%s'
|
and item.author_xchan = '%s'
|
||||||
and item.restrict = 0
|
and item.item_restrict = 0
|
||||||
order by term.term asc",
|
order by term.term asc",
|
||||||
intval($a->profile['profile_uid']),
|
intval($a->profile['profile_uid']),
|
||||||
intval(TERM_CATEGORY),
|
intval(TERM_CATEGORY),
|
||||||
|
@ -1 +1 @@
|
|||||||
2014-07-28.750
|
2014-07-29.751
|
||||||
|
Reference in New Issue
Block a user