mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
fix required $x variable overwritten with attach_mkdirp() data on update
This commit is contained in:
@@ -660,6 +660,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
||||
dbesc($arr['hash']),
|
||||
intval($channel_id)
|
||||
);
|
||||
|
||||
if(! $x) {
|
||||
logger('update file source not found');
|
||||
$ret['message'] = t('Cannot locate file to revise/update');
|
||||
@@ -729,14 +730,14 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
||||
$direct = null;
|
||||
|
||||
if($pathname) {
|
||||
$x = attach_mkdirp($channel, $observer_hash, $darr);
|
||||
$folder_hash = (($x['success']) ? $x['data']['hash'] : '');
|
||||
$direct = (($x['success']) ? $x['data'] : null);
|
||||
$new_dir = attach_mkdirp($channel, $observer_hash, $darr);
|
||||
$folder_hash = (($new_dir['success']) ? $new_dir['data']['hash'] : '');
|
||||
$direct = (($new_dir['success']) ? $new_dir['data'] : null);
|
||||
if((! $str_contact_allow) && (! $str_group_allow) && (! $str_contact_deny) && (! $str_group_deny)) {
|
||||
$str_contact_allow = $x['data']['allow_cid'];
|
||||
$str_group_allow = $x['data']['allow_gid'];
|
||||
$str_contact_deny = $x['data']['deny_cid'];
|
||||
$str_group_deny = $x['data']['deny_gid'];
|
||||
$str_contact_allow = $new_dir['data']['allow_cid'];
|
||||
$str_group_allow = $new_dir['data']['allow_gid'];
|
||||
$str_contact_deny = $new_dir['data']['deny_cid'];
|
||||
$str_group_deny = $new_dir['data']['deny_gid'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user