aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-01 00:54:20 -0800
committerfriendica <info@friendica.com>2014-02-01 00:54:20 -0800
commitd14afc0ee442a2ba4013c193fa80917026bb6111 (patch)
tree48ba50be8f106acddfcf7ee874c003e07a7a766d
parent33f3cd3d4a5935422f5ef910390263c6928e5c57 (diff)
downloadvolse-hubzilla-d14afc0ee442a2ba4013c193fa80917026bb6111.tar.gz
volse-hubzilla-d14afc0ee442a2ba4013c193fa80917026bb6111.tar.bz2
volse-hubzilla-d14afc0ee442a2ba4013c193fa80917026bb6111.zip
provide the room name for the room you're in.
-rw-r--r--mod/chat.php9
-rw-r--r--version.inc2
-rw-r--r--view/tpl/chat.tpl1
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 @@
+<h1>{{$room_name}}</h1>
<div id="chatContainer" style="height: 100%; width: 100%;">
<div id="chatTopBar" style="float: left; height: 400px; width: 650px; overflow-y: auto;">