issue #538 continued

This commit is contained in:
redmatrix
2016-09-29 16:20:26 -07:00
parent fcd7dc8744
commit 3727bea29a
5 changed files with 8 additions and 8 deletions

View File

@@ -229,7 +229,7 @@ function attach_list_files($channel_id, $observer, $hash = '', $filename = '', $
* @param int $rev Revision
* @return array
*/
function attach_by_hash($hash, $rev = 0) {
function attach_by_hash($hash, $observer_hash, $rev = 0) {
$ret = array('success' => false);
@@ -249,7 +249,7 @@ function attach_by_hash($hash, $rev = 0) {
return $ret;
}
if(! perm_is_allowed($r[0]['uid'], get_observer_hash(), 'view_storage')) {
if(! perm_is_allowed($r[0]['uid'], $observer_hash, 'view_storage')) {
$ret['message'] = t('Permission denied.');
return $ret;
}
@@ -315,7 +315,7 @@ function attach_can_view_folder($uid,$ob_hash,$folder_hash) {
* * \e string \b message (optional) only when success is false
* * \e array \b data array of attach DB entry without data component
*/
function attach_by_hash_nodata($hash, $rev = 0) {
function attach_by_hash_nodata($hash, $observer_hash, $rev = 0) {
$ret = array('success' => false);
@@ -335,7 +335,7 @@ function attach_by_hash_nodata($hash, $rev = 0) {
return $ret;
}
if(! perm_is_allowed($r[0]['uid'],get_observer_hash(),'view_storage')) {
if(! perm_is_allowed($r[0]['uid'],$observer_hash,'view_storage')) {
$ret['message'] = t('Permission denied.');
return $ret;
}