diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-07-11 16:36:58 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-07-11 16:36:58 -0700 |
commit | b7d3eb16056d4c91f60f3ae1e3b0085fdd6331b6 (patch) | |
tree | 562d24962f057115477815f553db235cbbc54fe7 /include | |
parent | 3ec2dc81f242b03668e209cd83488bf9830a8af4 (diff) | |
download | volse-hubzilla-b7d3eb16056d4c91f60f3ae1e3b0085fdd6331b6.tar.gz volse-hubzilla-b7d3eb16056d4c91f60f3ae1e3b0085fdd6331b6.tar.bz2 volse-hubzilla-b7d3eb16056d4c91f60f3ae1e3b0085fdd6331b6.zip |
Only let local logins install webpage elements
Diffstat (limited to 'include')
-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 e248c3771..ba9592a51 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; } |