forked from Wavyzz/dolibarr
enhance getMultiDirOutput
This commit is contained in:
@@ -163,12 +163,23 @@ function getMultidirOutput($object, $module = '', $forobject = 0, $mode = 'outpu
|
||||
$s .= ($mode != 'outputrel' ? '/' : '').get_exdir(0, 0, 0, 0, $object);
|
||||
}
|
||||
return $s;
|
||||
} elseif (isset($conf->$module) && property_exists($conf->$module, 'dir_output')) {
|
||||
$s = '';
|
||||
if ($mode != 'outputrel') {
|
||||
$s = $conf->$module->dir_output;
|
||||
}
|
||||
if ($forobject && $object->id > 0) {
|
||||
$s .= ($mode != 'outputrel' ? '/' : '').get_exdir(0, 0, 0, 0, $object);
|
||||
}
|
||||
return $s;
|
||||
} else {
|
||||
return 'error-diroutput-not-defined-for-this-object='.$module;
|
||||
}
|
||||
} elseif ($mode == 'temp') {
|
||||
if (isset($conf->$module) && property_exists($conf->$module, 'multidir_temp')) {
|
||||
return $conf->$module->multidir_temp[(empty($object->entity) ? $conf->entity : $object->entity)];
|
||||
} elseif (isset($conf->$module) && property_exists($conf->$module, 'dir_temp')) {
|
||||
return $conf->$module->dir_temp;
|
||||
} else {
|
||||
return 'error-dirtemp-not-defined-for-this-object='.$module;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user