Missed one

This commit is contained in:
Thomas Willingham 2014-03-18 02:41:58 +00:00
parent aa07edbdd1
commit 1446cc8096

View File

@ -276,7 +276,7 @@ class RedDirectory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
for($x = 1; $x < count($path_arr); $x ++) { for($x = 1; $x < count($path_arr); $x ++) {
$r = q("select id, hash, filename, flags from attach where folder = '%s' and filename = '%s' and uid = %d and (flags & %d)", $r = q("select id, hash, filename, flags from attach where folder = '%s' and filename = '%s' and uid = '%d' and (flags & %d)",
dbesc($folder), dbesc($folder),
dbesc($path_arr[$x]), dbesc($path_arr[$x]),
intval($channel_id), intval($channel_id),
@ -581,9 +581,10 @@ function RedCollectionData($file,&$auth) {
for($x = 1; $x < count($path_arr); $x ++) { for($x = 1; $x < count($path_arr); $x ++) {
$r = q("select id, hash, filename, flags from attach where folder = '%s' and filename = '%s' and (flags & %d) $perms limit 1", $r = q("select id, hash, filename, flags from attach where folder = '%s' and filename = '%s' and uid = %d and (flags & %d) $perms limit 1",
dbesc($folder), dbesc($folder),
dbesc($path_arr[$x]), dbesc($path_arr[$x]),
intval($channel_id),
intval(ATTACH_FLAG_DIR) intval(ATTACH_FLAG_DIR)
); );
if(! $r) { if(! $r) {