aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-13 18:30:30 -0800
committerfriendica <info@friendica.com>2015-01-13 18:30:30 -0800
commitdfdef0af0d045bdb0eb6e5ed557579966891e1a0 (patch)
tree9d5ce7fd4305daf12d32170d522fdd20ec1dc1ba /mod/item.php
parent98acefe22837a916d9a2330ceec250b0572b65d2 (diff)
downloadvolse-hubzilla-dfdef0af0d045bdb0eb6e5ed557579966891e1a0.tar.gz
volse-hubzilla-dfdef0af0d045bdb0eb6e5ed557579966891e1a0.tar.bz2
volse-hubzilla-dfdef0af0d045bdb0eb6e5ed557579966891e1a0.zip
provide a setting to control ALLOWCODE permissions at the channel level - it isn't always appropriate to apply this to all channels in an account.
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/mod/item.php b/mod/item.php
index e1855732e..bc8cfd047 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -449,10 +449,10 @@ function item_post(&$a) {
$execflag = false;
if($mimetype === 'application/x-php') {
- $z = q("select account_id, account_roles from account left join channel on channel_account_id = account_id where channel_id = %d limit 1",
+ $z = q("select account_id, account_roles, channel_pageflags from account left join channel on channel_account_id = account_id where channel_id = %d limit 1",
intval($profile_uid)
);
- if($z && ($z[0]['account_roles'] & ACCOUNT_ROLE_ALLOWCODE)) {
+ if($z && (($z[0]['account_roles'] & ACCOUNT_ROLE_ALLOWCODE) || ($z[0]['channel_pageflags'] & PAGE_ALLOWCODE))) {
if($uid && (get_account_id() == $z[0]['account_id'])) {
$execflag = true;
}