aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-17 20:24:58 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-17 20:24:58 -0700
commit1d2fdb259eab5af5f6ba967c61707e3a6dd9a3d0 (patch)
tree3bcdaa2dabca09451001f490e071ec54edf1e280 /include
parent3789c288a724117a750139c16b91088b70aba81e (diff)
downloadvolse-hubzilla-1d2fdb259eab5af5f6ba967c61707e3a6dd9a3d0.tar.gz
volse-hubzilla-1d2fdb259eab5af5f6ba967c61707e3a6dd9a3d0.tar.bz2
volse-hubzilla-1d2fdb259eab5af5f6ba967c61707e3a6dd9a3d0.zip
funny behaviour with post permissions after recent changes
Diffstat (limited to 'include')
-rw-r--r--include/security.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/security.php b/include/security.php
index ae161b4a4..1e0107dcc 100644
--- a/include/security.php
+++ b/include/security.php
@@ -1,11 +1,14 @@
<?php
function can_write_wall(&$a,$owner) {
+
if((! (local_user())) && (! (remote_user())))
return false;
$uid = get_uid();
- if(($uid) && ($uid === $owner))
+
+ if(($uid) && ($uid === $owner)) {
return true;
+ }
$r = q("SELECT `contact`.*, `user`.`page-flags` FROM `contact` LEFT JOIN `user` on `user`.`uid` = `contact`.`uid`
WHERE `contact`.`uid` = %d AND `contact`.`id` = %d AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
@@ -16,6 +19,7 @@ function can_write_wall(&$a,$owner) {
intval(REL_BUD),
intval(PAGE_COMMUNITY)
);
+
if(count($r))
return true;
return false;