attach_list_files had some problems - wasn't used until now apparently

This commit is contained in:
redmatrix
2015-10-12 19:49:06 -07:00
parent 8e7e9b7040
commit 3545626950
2 changed files with 10 additions and 2 deletions

View File

@@ -180,7 +180,7 @@ function attach_list_files($channel_id, $observer, $hash = '', $filename = '', $
$ret = array('success' => false);
if(! perm_is_allowed($channel_id,$observer, 'read_storage')) {
if(! perm_is_allowed($channel_id,$observer, 'view_storage')) {
$ret['message'] = t('Permission denied.');
return $ret;
}
@@ -202,7 +202,7 @@ function attach_list_files($channel_id, $observer, $hash = '', $filename = '', $
// Retrieve all columns except 'data'
$r = q("select id, aid, uid, hash, filename, filetype, filesize, revision, folder, flags, created, edited, allow_cid, allow_gid, deny_cid, deny_gid from attach where uid = %d $sql_extra $orderby $limit",
$r = q("select id, aid, uid, hash, filename, filetype, filesize, revision, folder, flags, created, edited, allow_cid, allow_gid, deny_cid, deny_gid from attach where uid = %d $sql_extra ORDER BY $orderby $limit",
intval($channel_id)
);