From d14afc0ee442a2ba4013c193fa80917026bb6111 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 1 Feb 2014 00:54:20 -0800 Subject: provide the room name for the room you're in. --- mod/chat.php | 9 ++++++++- version.inc | 2 +- view/tpl/chat.tpl | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mod/chat.php b/mod/chat.php index 54fa58092..612878cb2 100644 --- a/mod/chat.php +++ b/mod/chat.php @@ -101,8 +101,15 @@ function chat_content(&$a) { $x = chatroom_enter($observer,$room_id,'online',$_SERVER['REMOTE_ADDR']); if(! $x) return; + $x = q("select * from chatroom where cr_id = %d and cr_uid = %d $sql_extra limit 1", + intval($room_id), + intval($a->profile['profile_uid']) + ); + if($x) { + $room_name = $x[0]['cr_name']; + } $o = replace_macros(get_markup_template('chat.tpl'),array( - '$room_name' => '', // should we get this from the API? + '$room_name' => $room_name, '$room_id' => $room_id, '$submit' => t('Submit') )); diff --git a/version.inc b/version.inc index 44da03a50..a3517ab74 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2014-01-31.574 +2014-02-01.575 diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl index 420430550..eda1f83af 100644 --- a/view/tpl/chat.tpl +++ b/view/tpl/chat.tpl @@ -1,3 +1,4 @@ +

{{$room_name}}

-- cgit v1.2.3