Automated merge from 22.0 to 23.0 by tool pullmerge.sh
This commit is contained in:
commit
faa02fae27
7 changed files with 43 additions and 19 deletions
|
|
@ -1814,8 +1814,9 @@ abstract class CommonDocGenerator
|
|||
// Reset enabled: only printable attribute determines PDF visibility
|
||||
$enabled = 0;
|
||||
$disableOnEmpty = 0;
|
||||
$printable = 0;
|
||||
if (!empty($extrafields->attributes[$object->table_element]['printable'][$key])) {
|
||||
$printable = intval($extrafields->attributes[$object->table_element]['printable'][$key]);
|
||||
$printable = (int) $extrafields->attributes[$object->table_element]['printable'][$key];
|
||||
if (in_array($printable, $params['printableEnable']) || in_array($printable, $params['printableEnableNotEmpty'])) {
|
||||
$enabled = 1;
|
||||
}
|
||||
|
|
@ -1825,11 +1826,7 @@ abstract class CommonDocGenerator
|
|||
}
|
||||
}
|
||||
|
||||
if (empty($extrafields->attributes[$object->table_element]['printable'][$key])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (empty($enabled)) {
|
||||
if (empty($enabled) || empty($printable)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8076,7 +8076,11 @@ abstract class CommonObject
|
|||
}
|
||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
|
||||
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
|
||||
$keyList .= ', '.$parentField;
|
||||
if (!empty($InfoFieldList[4]) && strpos($InfoFieldList[4], 'extra.') !== false) {
|
||||
$keyList .= ', main.'.$parentField;
|
||||
} else {
|
||||
$keyList .= ', '.$parentField;
|
||||
}
|
||||
}
|
||||
|
||||
$filter_categorie = false;
|
||||
|
|
@ -8309,10 +8313,6 @@ abstract class CommonObject
|
|||
|
||||
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
|
||||
|
||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
|
||||
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
|
||||
$keyList .= ', '.$parentField;
|
||||
}
|
||||
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
|
||||
if (strpos($InfoFieldList[4], 'extra.') !== false) {
|
||||
$keyList = 'main.'.$InfoFieldList[2].' as rowid';
|
||||
|
|
@ -8320,6 +8320,14 @@ abstract class CommonObject
|
|||
$keyList = $InfoFieldList[2].' as rowid';
|
||||
}
|
||||
}
|
||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
|
||||
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
|
||||
if (!empty($InfoFieldList[4]) && strpos($InfoFieldList[4], 'extra.') !== false) {
|
||||
$keyList .= ', main.'.$parentField;
|
||||
} else {
|
||||
$keyList .= ', '.$parentField;
|
||||
}
|
||||
}
|
||||
|
||||
$filter_categorie = false;
|
||||
if (count($InfoFieldList) > 5) {
|
||||
|
|
|
|||
|
|
@ -1809,10 +1809,6 @@ class ExtraFields
|
|||
$parentField = '';
|
||||
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
|
||||
|
||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
|
||||
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
|
||||
$keyList .= ', '.$parentField;
|
||||
}
|
||||
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
|
||||
if (strpos($InfoFieldList[4], 'extra.') !== false) {
|
||||
$keyList = 'main.'.$InfoFieldList[2].' as rowid';
|
||||
|
|
@ -1820,6 +1816,14 @@ class ExtraFields
|
|||
$keyList = $InfoFieldList[2].' as rowid';
|
||||
}
|
||||
}
|
||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
|
||||
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
|
||||
if (!empty($InfoFieldList[4]) && strpos($InfoFieldList[4], 'extra.') !== false) {
|
||||
$keyList .= ', main.'.$parentField;
|
||||
} else {
|
||||
$keyList .= ', '.$parentField;
|
||||
}
|
||||
}
|
||||
|
||||
$InfoFieldList[5] = (string) $InfoFieldList[5];
|
||||
|
||||
|
|
|
|||
|
|
@ -3050,9 +3050,15 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||
$accessallowed = ($user->admin && basename($original_file) == $original_file && preg_match('/^dolibarr.*\.(log|json)$/', basename($original_file)));
|
||||
$original_file = $dolibarr_main_data_root.'/'.$original_file;
|
||||
} elseif ($modulepart == 'doctemplates' && !empty($dolibarr_main_data_root)) {
|
||||
// Wrapping for doctemplates
|
||||
$accessallowed = $user->admin;
|
||||
$original_file = $dolibarr_main_data_root.'/doctemplates/'.$original_file;
|
||||
$relative_file = $original_file;
|
||||
$ent = ($entity > 0 ? $entity : $conf->entity);
|
||||
$path_with_entity = $dolibarr_main_data_root . '/' . $ent . '/doctemplates/' . $relative_file;
|
||||
if ($ent > 1 && file_exists(dol_osencode($path_with_entity))) {
|
||||
$original_file = $path_with_entity;
|
||||
} else {
|
||||
$original_file = $dolibarr_main_data_root . '/doctemplates/' . $relative_file;
|
||||
}
|
||||
} elseif ($modulepart == 'doctemplateswebsite' && !empty($dolibarr_main_data_root)) {
|
||||
// Wrapping for doctemplates of websites
|
||||
$accessallowed = ($fuser->hasRight('website', 'write') && preg_match('/\.jpg$/i', basename($original_file)));
|
||||
|
|
|
|||
|
|
@ -740,6 +740,11 @@ if ($action == 'create' || $action == 'presend') {
|
|||
print load_fiche_titre($langs->trans('NewTicket'), '', 'ticket');
|
||||
|
||||
$formticket->trackid = ''; // TODO Use a unique key 'tic' to avoid conflict in upload file feature
|
||||
|
||||
if (GETPOST("mode", "aZ09") == 'init' && empty($_POST)) {
|
||||
$formticket->clear_attached_files();
|
||||
}
|
||||
|
||||
$formticket->withfromsocid = $socid ? $socid : $user->socid;
|
||||
$formticket->withfromcontactid = $contactid ? $contactid : '';
|
||||
$formticket->withtitletopic = 1;
|
||||
|
|
|
|||
|
|
@ -779,7 +779,7 @@ if ($projectid) {
|
|||
print '<input type="hidden" name="projectid" value="'.$projectid.'" >';
|
||||
}
|
||||
|
||||
$url = DOL_URL_ROOT.'/ticket/card.php?action=create'.($socid ? '&socid='.$socid : '').($projectid ? '&origin=projet_project&originid='.$projectid : '');
|
||||
$url = DOL_URL_ROOT.'/ticket/card.php?action=create&mode=init'.($socid ? '&socid='.$socid : '').($projectid ? '&origin=projet_project&originid='.$projectid : '');
|
||||
if (!empty($socid)) {
|
||||
$url .= '&socid='.$socid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -616,7 +616,11 @@ class FormWebPortal extends Form
|
|||
}
|
||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
|
||||
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
|
||||
$keyList .= ', ' . $parentField;
|
||||
if (!empty($InfoFieldList[4]) && strpos($InfoFieldList[4], 'extra.') !== false) {
|
||||
$keyList .= ', main.'.$parentField;
|
||||
} else {
|
||||
$keyList .= ', '.$parentField;
|
||||
}
|
||||
}
|
||||
|
||||
$filter_categorie = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue