Revert "Revert "merge""

This reverts commit 9294f72adb.
This commit is contained in:
Christian Vogeley
2013-08-03 00:18:14 +02:00
parent 9294f72adb
commit f09ac4e597
119 changed files with 1506 additions and 1508 deletions

View File

@@ -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;