aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-29 16:02:02 -0800
committerfriendica <info@friendica.com>2014-01-29 16:02:02 -0800
commit677f5f641e6c37244ee67459b6fa2c7e5aea119b (patch)
tree6e6ff468526ac2ebc2eb97cacd3c5cabe4f652b3
parent1915add7c1c812a368540ece48209729329ced94 (diff)
downloadvolse-hubzilla-677f5f641e6c37244ee67459b6fa2c7e5aea119b.tar.gz
volse-hubzilla-677f5f641e6c37244ee67459b6fa2c7e5aea119b.tar.bz2
volse-hubzilla-677f5f641e6c37244ee67459b6fa2c7e5aea119b.zip
more testing of chatroom interfaces, also corrected a function call that should have been a class instantiation in reddav
-rw-r--r--include/chat.php4
-rw-r--r--include/reddav.php2
-rw-r--r--include/widgets.php3
-rw-r--r--view/tpl/chatroomlist.tpl2
4 files changed, 7 insertions, 4 deletions
diff --git a/include/chat.php b/include/chat.php
index 6bcb003ff..f682fe6fe 100644
--- a/include/chat.php
+++ b/include/chat.php
@@ -88,8 +88,8 @@ function chatroom_enter($observer_xchan,$room_id,$status,$client) {
require_once('include/security.php');
$sql_extra = permissions_sql($r[0]['cr_uid']);
- $x = q("select * from chatroom where cr_id = %d and uid = %d $sql_extra limit 1",
- intval($room_id)
+ $x = q("select * from chatroom where cr_id = %d and cr_uid = %d $sql_extra limit 1",
+ intval($room_id),
intval($r[0]['cr_uid'])
);
if(! $x) {
diff --git a/include/reddav.php b/include/reddav.php
index c5ef39097..e6e066770 100644
--- a/include/reddav.php
+++ b/include/reddav.php
@@ -628,7 +628,7 @@ function RedFileData($file, &$auth,$test = false) {
}
if((! $file) || ($file === '/')) {
- return RedDirectory('/',$auth);
+ return new RedDirectory('/',$auth);
}
diff --git a/include/widgets.php b/include/widgets.php
index 8b22515b1..400660d11 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -580,8 +580,11 @@ function widget_menu_preview($arr) {
function widget_chatroom_list($arr) {
require_once("include/chat.php");
$r = chatroom_list(local_user());
+ $channel = get_app()->get_channel();
return replace_macros(get_markup_template('chatroomlist.tpl'),array(
'$header' => t('Chat Rooms'),
+ '$baseurl' => z_root(),
+ '$nickname' => $channel['channel_address'],
'$items' => $r,
));
} \ No newline at end of file
diff --git a/view/tpl/chatroomlist.tpl b/view/tpl/chatroomlist.tpl
index d2cf4d7b0..c26ba0c33 100644
--- a/view/tpl/chatroomlist.tpl
+++ b/view/tpl/chatroomlist.tpl
@@ -3,7 +3,7 @@
{{if $items}}
<table>
{{foreach $items as $item}}
-<tr><td>{{$item.cr_name}}</td><td>{{$item.cr_inroom}}</td></tr>
+<tr><td align="left"><a href="{{$baseurl}}/chat/{{$nickname}}/{{$item.cr_id}}">{{$item.cr_name}}</a></td><td align="right">{{$item.cr_inroom}}</td></tr>
{{/foreach}}
</table>
{{/if}}