aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorEiner von Vielen <tomwie@users.sourceforge.net>2015-01-14 22:49:16 +0100
committerEiner von Vielen <tomwie@users.sourceforge.net>2015-01-14 22:49:16 +0100
commitdfab2416926631b7b08c6c89b62528ca2520f130 (patch)
tree6c76af9d656eec6e74ed6c3c05d7ccc2b6ef5e48 /mod/item.php
parent09129cbe5f7e8cb331b68469b74438464960af0b (diff)
parent7090b58f68251b8c4b39332f2ea051e95ead3df3 (diff)
downloadvolse-hubzilla-dfab2416926631b7b08c6c89b62528ca2520f130.tar.gz
volse-hubzilla-dfab2416926631b7b08c6c89b62528ca2520f130.tar.bz2
volse-hubzilla-dfab2416926631b7b08c6c89b62528ca2520f130.zip
Merge remote-tracking branch 'upstream/master' into toc
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/mod/item.php b/mod/item.php
index 7a14a8ae9..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;
}
@@ -576,7 +576,7 @@ function item_post(&$a) {
// Look for tags and linkify them
- $results = linkify_tags($a, $body, $uid, $profile_uid);
+ $results = linkify_tags($a, $body, ($uid) ? $uid : $profile_uid);
// Set permissions based on tag replacements
set_linkified_perms($results, $str_contact_allow, $str_group_allow, $profile_uid, $parent_item);