aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2013-08-03 00:14:59 +0200
committerChristian Vogeley <christian.vogeley@hotmail.de>2013-08-03 00:14:59 +0200
commit9294f72adb3c076932558b6f29a4c570e7962764 (patch)
treec0a7d4f5b56e922c2a572f4f0a414a405f92cd82 /include/attach.php
parentc0cd147a3a9a86b270ea32026089ced16fb2f50c (diff)
downloadvolse-hubzilla-9294f72adb3c076932558b6f29a4c570e7962764.tar.gz
volse-hubzilla-9294f72adb3c076932558b6f29a4c570e7962764.tar.bz2
volse-hubzilla-9294f72adb3c076932558b6f29a4c570e7962764.zip
Revert "merge"
This reverts commit c0cd147a3a9a86b270ea32026089ced16fb2f50c, reversing changes made to d2d1e54bfe928fe4cdfdcfc7e9acf658cda76898.
Diffstat (limited to 'include/attach.php')
-rw-r--r--include/attach.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/attach.php b/include/attach.php
index 46d406f4b..38a011bcb 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -193,13 +193,13 @@ function attach_by_hash($hash,$rev = 0) {
$sql_extra = permissions_sql($r[0]['uid']);
// Now we'll see if we can access the attachment
-dbg(1);
+
$r = q("SELECT * FROM attach WHERE hash = '%s' and uid = %d $sql_extra LIMIT 1",
dbesc($hash),
intval($r[0]['uid'])
);
-dbg(0);
+
if(! $r) {
$ret['message'] = t('Permission denied.');
return $ret;