aboutsummaryrefslogtreecommitdiffstats
path: root/include/security.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-08-19 04:59:31 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-08-19 04:59:31 -0700
commite0045a43e22082e0a47fd57288105a21311e911a (patch)
treed20f36060be22a5c83526ca2a3654f1e4a31ace0 /include/security.php
parent6ed5b642a437a86077093391f3f2ec9889068d8d (diff)
downloadvolse-hubzilla-e0045a43e22082e0a47fd57288105a21311e911a.tar.gz
volse-hubzilla-e0045a43e22082e0a47fd57288105a21311e911a.tar.bz2
volse-hubzilla-e0045a43e22082e0a47fd57288105a21311e911a.zip
mongo checkin, global directory, redir rework, location basics
Diffstat (limited to 'include/security.php')
-rw-r--r--include/security.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/security.php b/include/security.php
index a71391dba..29334549b 100644
--- a/include/security.php
+++ b/include/security.php
@@ -6,9 +6,12 @@ function can_write_wall(&$a,$owner) {
if((local_user()) && ($_SESSION['uid'] == $owner))
return true;
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d AND `blocked` = 0 AND `pending` = 0
+ AND `readonly` = 0 AND `rel` IN ( %d , %d ) LIMIT 1",
intval($owner),
- intval($_SESSION['visitor_id'])
+ intval($_SESSION['visitor_id']),
+ intval(DIRECTION_OUT),
+ intval(DIRECTION_BOTH)
);
if(count($r))
return true;