FIX #17855
This commit is contained in:
parent
693ac3eab6
commit
e938d875fb
@ -76,7 +76,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->bom->multidir_output[$object->entity ? $object->entity : 1]."/bom/".get_exdir(0, 0, 0, 1, $object);
|
||||
$upload_dir = $conf->bom->multidir_output[$object->entity ? $object->entity : 1]."/".get_exdir(0, 0, 0, 1, $object);
|
||||
}
|
||||
|
||||
// Security check - Protection if external user
|
||||
@ -152,7 +152,7 @@ if ($object->id) {
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
//$relativepathwithnofile='bom/' . dol_sanitizeFileName($object->id).'/';
|
||||
$relativepathwithnofile = 'bom/'.dol_sanitizeFileName($object->ref).'/';
|
||||
$relativepathwithnofile = dol_sanitizeFileName($object->ref).'/';
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
} else {
|
||||
|
||||
@ -127,7 +127,7 @@ $permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the incl
|
||||
$permissiontodelete = $user->rights->mymodule->myobject->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||
$permissionnote = $user->rights->mymodule->myobject->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiondellink = $user->rights->mymodule->myobject->write; // Used by the include of actions_dellink.inc.php
|
||||
$upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||
$upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object->entity : 1].'/myobject';
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
//if ($user->socid > 0) accessforbidden();
|
||||
|
||||
@ -74,7 +74,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$upload_dir = $conf->mrp->multidir_output[$object->entity ? $object->entity : $conf->entity]."/mo/".get_exdir(0, 0, 0, 1, $object);
|
||||
$upload_dir = $conf->mrp->multidir_output[$object->entity ? $object->entity : $conf->entity]."/".get_exdir(0, 0, 0, 1, $object);
|
||||
}
|
||||
|
||||
// Security check - Protection if external user
|
||||
@ -184,7 +184,7 @@ if ($object->id) {
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
//$relativepathwithnofile='mo/' . dol_sanitizeFileName($object->id).'/';
|
||||
$relativepathwithnofile = 'mo/'.dol_sanitizeFileName($object->ref).'/';
|
||||
$relativepathwithnofile = dol_sanitizeFileName($object->ref).'/';
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user