From dfdef0af0d045bdb0eb6e5ed557579966891e1a0 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Jan 2015 18:30:30 -0800 Subject: 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. --- mod/impel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/impel.php') diff --git a/mod/impel.php b/mod/impel.php index 1c7541bef..60e80ff9f 100644 --- a/mod/impel.php +++ b/mod/impel.php @@ -75,11 +75,11 @@ function impel_init(&$a) { $execflag = false; if($arr['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(local_user()) ); - if($z && ($z[0]['account_roles'] & ACCOUNT_ROLE_ALLOWCODE)) { + if($z && (($z[0]['account_roles'] & ACCOUNT_ROLE_ALLOWCODE) || ($z[0]['channel_pageflags'] & PAGE_ALLOWCODE))) { $execflag = true; } } -- cgit v1.2.3