aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/impel.php4
-rw-r--r--mod/item.php4
2 files changed, 4 insertions, 4 deletions
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;
}
}
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;
}