more testing of chatroom interfaces, also corrected a function call that should have been a class instantiation in reddav
This commit is contained in:
parent
1915add7c1
commit
677f5f641e
@ -88,8 +88,8 @@ function chatroom_enter($observer_xchan,$room_id,$status,$client) {
|
|||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
$sql_extra = permissions_sql($r[0]['cr_uid']);
|
$sql_extra = permissions_sql($r[0]['cr_uid']);
|
||||||
|
|
||||||
$x = q("select * from chatroom where cr_id = %d and uid = %d $sql_extra limit 1",
|
$x = q("select * from chatroom where cr_id = %d and cr_uid = %d $sql_extra limit 1",
|
||||||
intval($room_id)
|
intval($room_id),
|
||||||
intval($r[0]['cr_uid'])
|
intval($r[0]['cr_uid'])
|
||||||
);
|
);
|
||||||
if(! $x) {
|
if(! $x) {
|
||||||
|
@ -628,7 +628,7 @@ function RedFileData($file, &$auth,$test = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if((! $file) || ($file === '/')) {
|
if((! $file) || ($file === '/')) {
|
||||||
return RedDirectory('/',$auth);
|
return new RedDirectory('/',$auth);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -580,8 +580,11 @@ function widget_menu_preview($arr) {
|
|||||||
function widget_chatroom_list($arr) {
|
function widget_chatroom_list($arr) {
|
||||||
require_once("include/chat.php");
|
require_once("include/chat.php");
|
||||||
$r = chatroom_list(local_user());
|
$r = chatroom_list(local_user());
|
||||||
|
$channel = get_app()->get_channel();
|
||||||
return replace_macros(get_markup_template('chatroomlist.tpl'),array(
|
return replace_macros(get_markup_template('chatroomlist.tpl'),array(
|
||||||
'$header' => t('Chat Rooms'),
|
'$header' => t('Chat Rooms'),
|
||||||
|
'$baseurl' => z_root(),
|
||||||
|
'$nickname' => $channel['channel_address'],
|
||||||
'$items' => $r,
|
'$items' => $r,
|
||||||
));
|
));
|
||||||
}
|
}
|
@ -3,7 +3,7 @@
|
|||||||
{{if $items}}
|
{{if $items}}
|
||||||
<table>
|
<table>
|
||||||
{{foreach $items as $item}}
|
{{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}}
|
{{/foreach}}
|
||||||
</table>
|
</table>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Reference in New Issue
Block a user