From 806f1f0fa134cc0168c9f86aaf10b8357fc19905 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 4 May 2014 20:30:52 -0700 Subject: UI for deleting chatrooms --- mod/chat.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mod/chat.php') diff --git a/mod/chat.php b/mod/chat.php index bf6eed57c..caf800f80 100644 --- a/mod/chat.php +++ b/mod/chat.php @@ -49,6 +49,7 @@ function chat_post(&$a) { if($_POST['action'] === 'drop') { + logger('delete chatroom'); chatroom_destroy($channel,array('cr_name' => $room)); goaway(z_root() . '/chat/' . $channel['channel_address']); } @@ -168,12 +169,14 @@ function chat_content(&$a) { } $o = replace_macros(get_markup_template('chat.tpl'),array( + '$is_owner' => ((local_user() && local_user() == $x[0]['cr_uid']) ? true : false), '$room_name' => $room_name, '$room_id' => $room_id, '$baseurl' => z_root(), '$nickname' => argv(1), '$submit' => t('Submit'), '$leave' => t('Leave Room'), + '$drop' => t('Delete This Room'), '$away' => t('I am away right now'), '$online' => t('I am online'), '$bookmark_link' => $bookmark_link, -- cgit v1.2.3