2
0
forked from Wavyzz/dolibarr

Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0

Conflicts:
	htdocs/core/lib/project.lib.php
	htdocs/societe/class/societe.class.php
This commit is contained in:
Laurent Destailleur
2023-07-19 02:03:34 +02:00
6 changed files with 27 additions and 22 deletions

View File

@@ -70,7 +70,6 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
}
print '<input type="hidden" name="search_showbirthday" value="'.((int) $showbirthday).'">';
if ($canedit) {
print '<div class="divsearchfield">';
// Type
$multiselect = 0;
@@ -81,6 +80,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect, 0, 'maxwidth500 widthcentpercentminusx');
print '</div>';
if ($canedit) {
// Assigned to user
print '<div class="divsearchfield">';
print img_picto($langs->trans("ActionsToDoBy"), 'user', 'class="pictofixedwidth inline-block"');

View File

@@ -1327,7 +1327,7 @@ function dol_sanitizeFileName($str, $newstr = '_', $unaccent = 1)
// Char '>' '<' '|' '$' and ';' are special chars for shells.
// Char '/' and '\' are file delimiters.
// Chars '--' can be used into filename to inject special paramaters like --use-compress-program to make command with file as parameter making remote execution of command
$filesystem_forbidden_chars = array('<', '>', '/', '\\', '?', '*', '|', '"', ':', '°', '$', ';');
$filesystem_forbidden_chars = array('<', '>', '/', '\\', '?', '*', '|', '"', ':', '°', '$', ';', '`');
$tmp = dol_string_nospecial($unaccent ? dol_string_unaccent($str) : $str, $newstr, $filesystem_forbidden_chars);
$tmp = preg_replace('/\-\-+/', '_', $tmp);
$tmp = preg_replace('/\s+\-([^\s])/', ' _$1', $tmp);
@@ -1352,7 +1352,7 @@ function dol_sanitizePathName($str, $newstr = '_', $unaccent = 1)
// List of special chars for filenames in windows are defined on page https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
// Char '>' '<' '|' '$' and ';' are special chars for shells.
// Chars '--' can be used into filename to inject special paramaters like --use-compress-program to make command with file as parameter making remote execution of command
$filesystem_forbidden_chars = array('<', '>', '?', '*', '|', '"', '°', '$', ';');
$filesystem_forbidden_chars = array('<', '>', '?', '*', '|', '"', '°', '$', ';', '`');
$tmp = dol_string_nospecial($unaccent ? dol_string_unaccent($str) : $str, $newstr, $filesystem_forbidden_chars);
$tmp = preg_replace('/\-\-+/', '_', $tmp);
$tmp = preg_replace('/\s+\-([^\s])/', ' _$1', $tmp);

View File

@@ -988,7 +988,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
print '<tr class="liste_total nodrag nodrop">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class=""></td>';
print '<td class="liste_total"></td>';
}
print '<td class="liste_total">'.$langs->trans("Total").'</td>';
@@ -998,6 +998,9 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
if (count($arrayfields) > 0 && !empty($arrayfields['t.label']['checked'])) {
print '<td></td>';
}
if (count($arrayfields) > 0 && !empty($arrayfields['t.description']['checked'])) {
print '<td></td>';
}
if (count($arrayfields) > 0 && !empty($arrayfields['t.dateo']['checked'])) {
print '<td></td>';
}
@@ -1119,10 +1122,10 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
}
// Column for the drag and drop
print '<td class=""></td>';
print '<td class="liste_total"></td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class=""></td>';
print '<td class="liste_total"></td>';
}
print '</tr>';

View File

@@ -64,6 +64,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa
$id = (GETPOST('facid', 'int') ? GETPOST('facid', 'int') : GETPOST('id', 'int'));
$lineid = GETPOST('lineid', 'int');
$title = GETPOST('title', 'alpha');
$libelle = GETPOST('libelle', 'alpha');
$ref_supplier = GETPOST('ref_supplier', 'alpha');
$projectid = GETPOST('projectid', 'int');
$year_date_when = GETPOST('year_date_when');
@@ -189,6 +190,7 @@ if (empty($reshook)) {
if (! $error) {
$object->titre = GETPOST('title', 'alphanohtml'); // deprecated
$object->title = GETPOST('title', 'alphanohtml');
$object->libelle = GETPOST('libelle','alpha');
$object->fk_project = GETPOST('projectid', 'int');
$object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml');

View File

@@ -1487,7 +1487,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"');
print $formproduct->selectWarehouses(GETPOST('fk_default_warehouse', 'int'), 'fk_default_warehouse', 'warehouseopen', 1, 0, 0, '', 0, 0, array(), 'minwidth300 widthcentpercentminusxx maxwidth500');
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&token='.newToken().'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id.'&action=create&token='.newToken()).'">';
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&token='.newToken().'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?&action=create&type='.GETPOST('type', 'int')).'">';
print '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddWarehouse").'"></span>';
print '</a>';
print '</td>';
@@ -2054,7 +2054,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"');
print $formproduct->selectWarehouses((GETPOSTISSET('fk_default_warehouse') ? GETPOST('fk_default_warehouse') : $object->fk_default_warehouse), 'fk_default_warehouse', 'warehouseopen', 1);
<<<<<<< HEAD
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&amp;backtopage='.urlencode($_SERVER['PHP_SELF'].'?action=edit&id='.((int) $object->id).'">';
=======
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&amp;backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit&token='.newToken().'&type='.GETPOST('type', 'int')).'">';
>>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git
print '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddWarehouse").'"></span></a>';
print '</td></tr>';
/*

View File

@@ -2625,12 +2625,8 @@ class Societe extends CommonObject
$option = $params['option'] ?? '';
$nofetch = !empty($params['nofetch']);
$name = $this->name;
$noaliasinname = (empty($params['noaliasinname']) ? 0 : $params['noaliasinname']);
if (!empty($this->name_alias) && empty($noaliasinname)) {
$name .= ' ('.$this->name_alias.')';
}
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
return ['optimize' => $langs->trans("ShowCompany")];
}
@@ -2677,7 +2673,7 @@ class Societe extends CommonObject
$datas['type'] = ' &nbsp; ' . $this->getTypeUrl(1);
}
$datas['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag(dol_string_nohtmltag($this->name));
if (!empty($this->name_alias)) {
if (!empty($this->name_alias) && empty($noaliasinname)) {
$datas['namealias'] = ' ('.dol_escape_htmltag(dol_string_nohtmltag($this->name_alias)).')';
}
if (!empty($this->email)) {