Debug v20
This commit is contained in:
parent
3a7bdaad87
commit
a05c03ff4e
2 changed files with 28 additions and 19 deletions
|
|
@ -120,16 +120,17 @@ if (!function_exists('str_contains')) {
|
|||
|
||||
|
||||
/**
|
||||
* Return the full path of the directory where a module (or an object of a module) stores its files.
|
||||
* Return the full path of the directory where a module (or an object of a module) stores its files,
|
||||
* Path may depends on the entity if a multicompany module is enabled.
|
||||
*
|
||||
* @param CommonObject $object Dolibarr common object
|
||||
* @param string $module Override object element, for example to use 'mycompany' instead of 'societe'
|
||||
* @param int $forobject Return the more complete path for the given object instead of for the module only.
|
||||
* @param string $mode 'output' or 'temp' or 'version'
|
||||
* @return string|null The path of the relative directory of the module
|
||||
* @since Dolibarr V18
|
||||
*/
|
||||
function getMultidirOutput($object, $module = '', $mode = 'output')
|
||||
function getMultidirOutput($object, $module = '', $forobject = 0, $mode = 'output')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
|
@ -148,7 +149,11 @@ function getMultidirOutput($object, $module = '', $mode = 'output')
|
|||
// Get the relative path of directory
|
||||
if ($mode == 'output' || $mode == 'version') {
|
||||
if (isset($conf->$module) && property_exists($conf->$module, 'multidir_output')) {
|
||||
return $conf->$module->multidir_output[(empty($object->entity) ? $conf->entity : $object->entity)];
|
||||
$s = $conf->$module->multidir_output[(empty($object->entity) ? $conf->entity : $object->entity)];
|
||||
if ($forobject && $object->id > 0) {
|
||||
$s .= '/'.get_exdir(0, 0, 0, 0, $object);
|
||||
}
|
||||
return $s;
|
||||
} else {
|
||||
return 'error-diroutput-not-defined-for-this-object='.$module;
|
||||
}
|
||||
|
|
@ -167,26 +172,28 @@ function getMultidirOutput($object, $module = '', $mode = 'output')
|
|||
* Return the full path of the directory where a module (or an object of a module) stores its temporary files.
|
||||
* Path may depends on the entity if a multicompany module is enabled.
|
||||
*
|
||||
* @param CommonObject $object Dolibarr common object
|
||||
* @param string $module Override object element, for example to use 'mycompany' instead of 'societe'
|
||||
* @return string|null The path of the relative temp directory of the module
|
||||
* @param CommonObject $object Dolibarr common object
|
||||
* @param string $module Override object element, for example to use 'mycompany' instead of 'societe'
|
||||
* @param int $forobject Return the more complete path for the given object instead of for the module only.
|
||||
* @return string|null The path of the relative temp directory of the module
|
||||
*/
|
||||
function getMultidirTemp($object, $module = '')
|
||||
function getMultidirTemp($object, $module = '', $forobject = 0)
|
||||
{
|
||||
return getMultiDirOutput($object, $module, 'temp');
|
||||
return getMultiDirOutput($object, $module, $forobject, 'temp');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the full path of the directory where a module (or an object of a module) stores its versioned files.
|
||||
* Path may depends on the entity if a multicompany module is enabled.
|
||||
*
|
||||
* @param CommonObject $object Dolibarr common object
|
||||
* @param string $module Override object element, for example to use 'mycompany' instead of 'societe'
|
||||
* @return string|null The path of the relative version directory of the module
|
||||
* @param CommonObject $object Dolibarr common object
|
||||
* @param string $module Override object element, for example to use 'mycompany' instead of 'societe'
|
||||
* @param int $forobject Return the more complete path for the given object instead of for the module only.
|
||||
* @return string|null The path of the relative version directory of the module
|
||||
*/
|
||||
function getMultidirVersion($object, $module = '')
|
||||
function getMultidirVersion($object, $module = '', $forobject = 0)
|
||||
{
|
||||
return getMultiDirOutput($object, $module, 'version');
|
||||
return getMultiDirOutput($object, $module, $forobject, 'version');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -458,19 +458,21 @@ class FormCardWebPortal
|
|||
$html .= '<header>';
|
||||
|
||||
// Left block - begin
|
||||
$html .= '<div class="header-card-left-block" style="width: 75%;">';
|
||||
$html .= '<div class="header-card-left-block inline-block" style="width: 75%;">';
|
||||
$html .= '<div>';
|
||||
|
||||
// logo or photo
|
||||
$form = new Form($this->db);
|
||||
$html .= '<div class="inline-block floatleft valignmiddle">';
|
||||
$html .= '<div class="floatleft inline-block valignmiddle divphotoref">';
|
||||
$html .= $form->showphoto('memberphoto', $object, 0, 0, 0, 'photowithmargin photoref', 'small', 1, 0, 1);
|
||||
//include DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
|
||||
//$html .= getImagePublicURLOfObject($object, 1, '_small');
|
||||
|
||||
// logo or photo
|
||||
$html .= '<div></div>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
// main information - begin
|
||||
$html .= '<div class="header-card-main-information">';
|
||||
$html .= '<div class="header-card-main-information inline-block valignmiddle">';
|
||||
// ref
|
||||
$html .= '<div><strong>' . $langs->trans("Ref").' : '.dol_escape_htmltag($object->ref) . '</strong></div>';
|
||||
// full name
|
||||
|
|
@ -510,7 +512,7 @@ class FormCardWebPortal
|
|||
// Left block - end
|
||||
|
||||
// Right block - begin
|
||||
$html .= '<div class="header-card-right-block">';
|
||||
$html .= '<div class="header-card-right-block inline-block" style="width: 24%;">';
|
||||
// show status
|
||||
$htmlStatus = $object->getLibStatut(6);
|
||||
if (empty($htmlStatus) || $htmlStatus == $object->getLibStatut(3)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue