diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/chat.php | 5 | ||||
-rw-r--r-- | mod/item.php | 2 | ||||
-rw-r--r-- | mod/ping.php | 6 |
3 files changed, 11 insertions, 2 deletions
diff --git a/mod/chat.php b/mod/chat.php index e3725830c..872571f8c 100644 --- a/mod/chat.php +++ b/mod/chat.php @@ -79,6 +79,9 @@ function chat_post(&$a) { function chat_content(&$a) { + if(local_user()) + $channel = $a->get_channel(); + $observer = get_observer_hash(); if(! $observer) { notice( t('Permission denied.') . EOL); @@ -129,7 +132,7 @@ function chat_content(&$a) { if(local_user() && argc() > 2 && argv(2) === 'new') { - $channel = $a->get_channel(); + $channel_acl = array( 'allow_cid' => $channel['channel_allow_cid'], 'allow_gid' => $channel['channel_allow_gid'], diff --git a/mod/item.php b/mod/item.php index c8c0e3762..47a3f1961 100644 --- a/mod/item.php +++ b/mod/item.php @@ -425,7 +425,7 @@ function item_post(&$a) { * (already known to us) which will get a zrl, otherwise link with url */ - $body = preg_replace_callback("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", 'red_zrl_callback', $body); + $body = preg_replace_callback("/([^\^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", 'red_zrl_callback', $body); /** * diff --git a/mod/ping.php b/mod/ping.php index 4b07fee7a..b9d9a9c77 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -43,6 +43,12 @@ function ping_init(&$a) { unset($_SESSION['sysmsg_info']); } + if($a->install) { + echo json_encode($result); + killme(); + } + + if(get_observer_hash() && (! $result['invalid'])) { $r = q("select cp_id, cp_room from chatpresence where cp_xchan = '%s' and cp_client = '%s' and cp_room = 0 limit 1", dbesc(get_observer_hash()), |