mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix GETPOSTINT
This commit is contained in:
parent
8ed9866433
commit
027cf37940
|
|
@ -53,7 +53,6 @@ $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
|||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'holidaylist'; // To manage different context of search
|
||||
$mode = GETPOST('mode', 'alpha'); // for switch mode view result
|
||||
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
|
|
@ -83,7 +82,7 @@ if (!$sortfield) {
|
|||
$sortfield = "cp.ref";
|
||||
}
|
||||
|
||||
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
||||
$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
||||
$search_ref = GETPOST('search_ref', 'alphanohtml');
|
||||
$search_day_create = GETPOST('search_day_create', 'int');
|
||||
$search_month_create = GETPOST('search_month_create', 'int');
|
||||
|
|
@ -94,10 +93,10 @@ $search_year_start = GETPOST('search_year_start', 'int');
|
|||
$search_day_end = GETPOST('search_day_end', 'int');
|
||||
$search_month_end = GETPOST('search_month_end', 'int');
|
||||
$search_year_end = GETPOST('search_year_end', 'int');
|
||||
$search_employee = GETPOSTINT('search_employee');
|
||||
$search_valideur = GETPOSTINT('search_valideur');
|
||||
$search_employee = GETPOST('search_employee', 'intcomma');
|
||||
$search_valideur = GETPOST('search_valideur', 'intcomma');
|
||||
$search_status = GETPOST('search_status', 'intcomma');
|
||||
$search_type = GETPOSTINT('search_type');
|
||||
$search_type = GETPOST('search_type', 'intcomma');
|
||||
|
||||
// Initialize technical objects
|
||||
$object = new Holiday($db);
|
||||
|
|
@ -322,8 +321,8 @@ $sql .= ", ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua";
|
|||
$sql .= " WHERE cp.entity IN (".getEntity('holiday').")";
|
||||
$sql .= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pour la recherche sur le tableau
|
||||
// Search all
|
||||
if (!empty($sall)) {
|
||||
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
||||
if (!empty($search_all)) {
|
||||
$sql .= natural_search(array_keys($fieldstosearchall), $search_all);
|
||||
}
|
||||
// Ref
|
||||
if (!empty($search_ref)) {
|
||||
|
|
@ -552,14 +551,14 @@ $objecttmp = new Holiday($db);
|
|||
$trackid = 'leav'.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
|
||||
if ($sall) {
|
||||
if ($search_all) {
|
||||
$setupstring = '';
|
||||
foreach ($fieldstosearchall as $key => $val) {
|
||||
$fieldstosearchall[$key] = $langs->trans($val);
|
||||
$setupstring .= $key."=".$val.";";
|
||||
}
|
||||
print '<!-- Search done like if HOLIDAY_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
|
||||
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).implode(', ', $fieldstosearchall).'</div>';
|
||||
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).implode(', ', $fieldstosearchall).'</div>';
|
||||
}
|
||||
|
||||
$moreforfilter = '';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user