forked from Wavyzz/dolibarr
Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -421,6 +421,9 @@ function dol_shutdown()
|
||||
|
||||
/**
|
||||
* Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
|
||||
* Warning:
|
||||
* For action=add, use: $var = GETPOST('var'); // No GETPOSTISSET, so GETPOST always called and default value is retreived if not a form POST, and value of form is retreived if it is a form POST.
|
||||
* For action=update, use: $var = GETPOSTISSET('var') ? GETPOST('var') : $object->var;
|
||||
*
|
||||
* @param string $paramname Name or parameter to test
|
||||
* @return boolean True if we have just submit a POST or GET request with the parameter provided (even if param is empty)
|
||||
@@ -4095,7 +4098,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'autofill', 'folder', 'folder-open', 'folder-plus',
|
||||
'gears', 'generate', 'globe', 'globe-americas', 'graph', 'grip', 'grip_title', 'group',
|
||||
'help', 'holiday',
|
||||
'id-card', 'images', 'incoterm', 'info', 'intervention', 'inventory', 'intracommreport', 'knowledgemanagement',
|
||||
'id-card', 'images', 'incoterm', 'info', 'intervention', 'inventory', 'intracommreport', 'jobprofile',
|
||||
'knowledgemanagement',
|
||||
'label', 'language', 'line', 'link', 'list', 'list-alt', 'listlight', 'loan', 'lock', 'lot', 'long-arrow-alt-right',
|
||||
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'movement', 'mrp', 'note', 'next',
|
||||
'off', 'on', 'order',
|
||||
@@ -4110,7 +4114,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'technic', 'ticket',
|
||||
'error', 'warning',
|
||||
'recent', 'reception', 'recruitmentcandidature', 'recruitmentjobposition', 'replacement', 'resource', 'recurring','rss',
|
||||
'shapes', 'square', 'stop-circle', 'supplier', 'supplier_proposal', 'supplier_order', 'supplier_invoice',
|
||||
'shapes', 'skill', 'square', 'stop-circle', 'supplier', 'supplier_proposal', 'supplier_order', 'supplier_invoice',
|
||||
'timespent', 'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda',
|
||||
'uncheck', 'url', 'user-cog', 'user-injured', 'user-md', 'vat', 'website', 'workstation', 'webhook', 'world', 'private',
|
||||
'conferenceorbooth', 'eventorganization',
|
||||
@@ -4142,7 +4146,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'email'=>'at', 'establishment'=>'building', 'edit'=>'pencil-alt', 'entity'=>'globe',
|
||||
'graph'=>'chart-line', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
|
||||
'generic'=>'file', 'holiday'=>'umbrella-beach',
|
||||
'info'=>'info-circle', 'inventory'=>'boxes', 'intracommreport'=>'globe-europe', 'knowledgemanagement'=>'ticket-alt', 'label'=>'layer-group', 'line'=>'bars', 'loan'=>'money-bill-alt',
|
||||
'info'=>'info-circle', 'inventory'=>'boxes', 'intracommreport'=>'globe-europe', 'jobprofile'=>'cogs',
|
||||
'knowledgemanagement'=>'ticket-alt', 'label'=>'layer-group', 'line'=>'bars', 'loan'=>'money-bill-alt',
|
||||
'member'=>'user-alt', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
|
||||
'trip'=>'wallet', 'expensereport'=>'wallet', 'group'=>'users', 'movement'=>'people-carry',
|
||||
'sign-out'=>'sign-out-alt',
|
||||
@@ -4158,7 +4163,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature',
|
||||
'refresh'=>'redo', 'region'=>'map-marked', 'replacement'=>'exchange-alt', 'resource'=>'laptop-house', 'recurring'=>'history',
|
||||
'service'=>'concierge-bell',
|
||||
'state'=>'map-marked-alt', 'security'=>'key', 'salary'=>'wallet', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'stripe'=>'stripe-s',
|
||||
'skill'=>'shapes', 'state'=>'map-marked-alt', 'security'=>'key', 'salary'=>'wallet', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'stripe'=>'stripe-s',
|
||||
'supplier'=>'building', 'technic'=>'cogs',
|
||||
'timespent'=>'clock', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach',
|
||||
'title_agenda'=>'calendar-alt',
|
||||
@@ -5370,10 +5375,10 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pict
|
||||
$return .= '<div class="titre inline-block">'.$titre.'</div>';
|
||||
$return .= '</td>';
|
||||
if (dol_strlen($morehtmlcenter)) {
|
||||
$return .= '<td class="nobordernopadding center valignmiddle">'.$morehtmlcenter.'</td>';
|
||||
$return .= '<td class="nobordernopadding center valignmiddle col-center">'.$morehtmlcenter.'</td>';
|
||||
}
|
||||
if (dol_strlen($morehtmlright)) {
|
||||
$return .= '<td class="nobordernopadding titre_right wordbreakimp right valignmiddle">'.$morehtmlright.'</td>';
|
||||
$return .= '<td class="nobordernopadding titre_right wordbreakimp right valignmiddle col-right">'.$morehtmlright.'</td>';
|
||||
}
|
||||
$return .= '</tr></table>'."\n";
|
||||
|
||||
@@ -5445,11 +5450,11 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
|
||||
|
||||
// Center
|
||||
if ($morehtmlcenter) {
|
||||
print '<td class="nobordernopadding center valignmiddle">'.$morehtmlcenter.'</td>';
|
||||
print '<td class="nobordernopadding center valignmiddle col-center">'.$morehtmlcenter.'</td>';
|
||||
}
|
||||
|
||||
// Right
|
||||
print '<td class="nobordernopadding valignmiddle right">';
|
||||
print '<td class="nobordernopadding valignmiddle right col-right">';
|
||||
print '<input type="hidden" name="pageplusoneold" value="'.((int) $page + 1).'">';
|
||||
if ($sortfield) {
|
||||
$options .= "&sortfield=".urlencode($sortfield);
|
||||
@@ -9804,7 +9809,7 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0)
|
||||
$value = preg_replace('/\*/', '%', $value); // Replace * with %
|
||||
}
|
||||
if ($mode == 1) {
|
||||
$value = preg_replace('/([<>=]+)\s+([0-9'.preg_quote($langs->trans("DecimalSeparator"), '/').'\-])/', '\1\2', $value); // Clean string '< 10' into '<10' so we can the explode on space to get all tests to do
|
||||
$value = preg_replace('/([!<>=]+)\s+([0-9'.preg_quote($langs->trans("DecimalSeparator"), '/').'\-])/', '\1\2', $value); // Clean string '< 10' into '<10' so we can the explode on space to get all tests to do
|
||||
}
|
||||
|
||||
$value = preg_replace('/\s*\|\s*/', '|', $value);
|
||||
@@ -9824,10 +9829,10 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0)
|
||||
foreach ($fields as $field) {
|
||||
if ($mode == 1) {
|
||||
$operator = '=';
|
||||
$newcrit = preg_replace('/([<>=]+)/', '', $crit);
|
||||
$newcrit = preg_replace('/([!<>=]+)/', '', $crit);
|
||||
|
||||
$reg = array();
|
||||
preg_match('/([<>=]+)/', $crit, $reg);
|
||||
preg_match('/([!<>=]+)/', $crit, $reg);
|
||||
if (!empty($reg[1])) {
|
||||
$operator = $reg[1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user