diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-07-29 22:04:07 +0200 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-07-29 22:04:07 +0200 |
commit | 98fa996b3f5125b60e2653bca2218b08041ad6a4 (patch) | |
tree | 685c3909ac49f7a25cd39877f74ed56ada9b15e0 /include/bbcode.php | |
parent | 07e890a79a5c506b2e32272edf86ad4aba3b8fba (diff) | |
parent | cbb6d37b6ca7e5d9e476fd3e7bea3ba56d3271e1 (diff) | |
download | volse-hubzilla-98fa996b3f5125b60e2653bca2218b08041ad6a4.tar.gz volse-hubzilla-98fa996b3f5125b60e2653bca2218b08041ad6a4.tar.bz2 volse-hubzilla-98fa996b3f5125b60e2653bca2218b08041ad6a4.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index aa2562d62..2e201344c 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -174,10 +174,14 @@ function bb_parse_app($match) { function bb_parse_element($match) { $j = json_decode(base64url_decode($match[1]),true); - if ($j) { + if ($j && local_channel()) { $text = sprintf( t('Install %s element: '), translate_design_element($j['type'])) . $j['pagetitle']; $o = EOL . '<a href="#" onclick="importElement(\'' . $match[1] . '\'); return false;" >' . $text . '</a>' . EOL; } + else { + $text = sprintf( t('This post contains an installable %s element, however you lack permissions to install it on this site.' ), translate_design_element($j['type'])) . $j['pagetitle']; + $o = EOL . $text . EOL; + } return $o; } |