Clean trim on GETPOST (already included inside GETPOST when not 'none'

This commit is contained in:
Laurent Destailleur 2020-08-28 21:27:50 +02:00
parent 25f1f1eafb
commit ad87e753b4
52 changed files with 65 additions and 65 deletions

View File

@ -292,7 +292,7 @@ if ($action == 'setjournal') {
}
if ($action == 'setdocref') {
$refdoc = trim(GETPOST('doc_ref', 'alpha'));
$refdoc = GETPOST('doc_ref', 'alpha');
$result = $object->updateByMvt($piece_num, 'doc_ref', $refdoc, $mode);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');

View File

@ -108,7 +108,7 @@ if ($actionsave)
// Save colors
while ($i <= 2)
{
$color = trim(GETPOST('BANK_COLORIZE_MOVEMENT_COLOR'.$i, 'alpha'));
$color = GETPOST('BANK_COLORIZE_MOVEMENT_COLOR'.$i, 'alpha');
if ($color == '-1') $color = '';
$res = dolibarr_set_const($db, 'BANK_COLORIZE_MOVEMENT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity);

View File

@ -62,7 +62,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val) {
if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha');

View File

@ -86,7 +86,7 @@ if ($user->socid > 0) // Protection if external user
//$result = restrictedArea($user, 'emailcollector', $id, '');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -80,7 +80,7 @@ if ($user->socid > 0) // Protection if external user
//$result = restrictedArea($user, 'mymodule', $id, '');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -33,7 +33,7 @@ $langs->load("admin");
$action = GETPOST('action', 'alpha');
$what = GETPOST('what', 'alpha');
$export_type = GETPOST('export_type', 'alpha');
$file = trim(GETPOST('zipfilename_template', 'alpha'));
$file = GETPOST('zipfilename_template', 'alpha');
$compression = GETPOST('compression');
$file = dol_sanitizeFileName($file);

View File

@ -53,7 +53,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -81,7 +81,7 @@ if ($user->socid > 0) // Protection if external user
//$result = restrictedArea($user, 'asset', $id,'');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -57,7 +57,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -81,7 +81,7 @@ if ($user->socid > 0) // Protection if external user
//$result = restrictedArea($user, 'bom', $id, '');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -250,8 +250,8 @@ if (empty($reshook) && $action == 'add')
// Initialisation objet actioncomm
$object->priority = GETPOST("priority") ? GETPOST("priority") : 0;
$object->fulldayevent = (!empty($fulldayevent) ? 1 : 0);
$object->location = GETPOST("location");
$object->label = trim(GETPOST('label'));
$object->location = GETPOST("location", 'alphanohtml');
$object->label = GETPOST('label', 'alphanohtml');
$object->fk_element = GETPOST("fk_element", 'int');
$object->elementtype = GETPOST("elementtype", 'alpha');
if (!GETPOST('label'))

View File

@ -78,7 +78,7 @@ $search_login = GETPOST('search_login', 'alpha');
$search_product_category = GETPOST('search_product_category', 'int');
$search_town = GETPOST('search_town', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
$search_state = trim(GETPOST("search_state"));
$search_state = GETPOST("search_state");
$search_country = GETPOST("search_country", 'int');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
@ -88,7 +88,7 @@ $search_dateend_end = dol_mktime(23, 59, 59, GETPOST('search_dateend_endmonth',
$search_datedelivery_start = dol_mktime(0, 0, 0, GETPOST('search_datedelivery_startmonth', 'int'), GETPOST('search_datedelivery_startday', 'int'), GETPOST('search_datedelivery_startyear', 'int'));
$search_datedelivery_end = dol_mktime(23, 59, 59, GETPOST('search_datedelivery_endmonth', 'int'), GETPOST('search_datedelivery_endday', 'int'), GETPOST('search_datedelivery_endyear', 'int'));
$search_availability = GETPOST('search_availability', 'int');
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
$search_categ_cus = GETPOST("search_categ_cus", 'int');
$search_btn = GETPOST('button_search', 'alpha');
$search_remove_btn = GETPOST('button_removefilter', 'alpha');

View File

@ -65,7 +65,7 @@ $search_ref_customer = GETPOST('search_ref_customer', 'alpha');
$search_company = GETPOST('search_company', 'alpha');
$search_town = GETPOST('search_town', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
$search_state = trim(GETPOST("search_state"));
$search_state = GETPOST("search_state");
$search_country = GETPOST("search_country", 'int');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
@ -82,7 +82,7 @@ $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'a
$search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha');
$search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha');
$search_login = GETPOST('search_login', 'alpha');
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
$search_categ_cus = GETPOST("search_categ_cus", 'int');
$optioncss = GETPOST('optioncss', 'alpha');
$billed = GETPOST('billed', 'int');
$search_status = GETPOST('search_status', 'int');

View File

@ -217,7 +217,7 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', '
$error = 0;
// Definition, nettoyage parametres
$num_releve = trim(GETPOST("num_releve", "alpha"));
$num_releve = GETPOST("num_releve", "alpha");
if ($num_releve)
{

View File

@ -98,7 +98,7 @@ if ($user->socid > 0) // Protection if external user
//$result = restrictedArea($user, 'monmodule', $id, '');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -100,7 +100,7 @@ $search_module_source = GETPOST('search_module_source', 'alpha');
$search_pos_source = GETPOST('search_pos_source', 'alpha');
$search_town = GETPOST('search_town', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
$search_state = trim(GETPOST("search_state"));
$search_state = GETPOST("search_state");
$search_country = GETPOST("search_country", 'int');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
$search_user = GETPOST('search_user', 'int');
@ -111,7 +111,7 @@ $search_date_valid_start = dol_mktime(0, 0, 0, GETPOST('search_date_valid_startm
$search_date_valid_end = dol_mktime(23, 59, 59, GETPOST('search_date_valid_endmonth', 'int'), GETPOST('search_date_valid_endday', 'int'), GETPOST('search_date_valid_endyear', 'int'));
$search_datelimit_start = dol_mktime(0, 0, 0, GETPOST('search_datelimit_startmonth', 'int'), GETPOST('search_datelimit_startday', 'int'), GETPOST('search_datelimit_startyear', 'int'));
$search_datelimit_end = dol_mktime(23, 59, 59, GETPOST('search_datelimit_endmonth', 'int'), GETPOST('search_datelimit_endday', 'int'), GETPOST('search_datelimit_endyear', 'int'));
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
$search_categ_cus = GETPOST("search_categ_cus", 'int');
$search_btn = GETPOST('button_search', 'alpha');
$search_remove_btn = GETPOST('button_removefilter', 'alpha');

View File

@ -107,7 +107,7 @@ if (empty($reshook))
if (substr($key, 0, 7) == 'amount_' && GETPOST($key) != '')
{
$cursorfacid = substr($key, 7);
$amounts[$cursorfacid] = price2num(trim(GETPOST($key)));
$amounts[$cursorfacid] = price2num(GETPOST($key));
$totalpayment = $totalpayment + $amounts[$cursorfacid];
if (!empty($amounts[$cursorfacid])) $atleastonepaymentnotnull++;
$result = $tmpinvoice->fetch($cursorfacid);
@ -134,7 +134,7 @@ if (empty($reshook))
} elseif (substr($key, 0, 21) == 'multicurrency_amount_')
{
$cursorfacid = substr($key, 21);
$multicurrency_amounts[$cursorfacid] = price2num(trim(GETPOST($key)));
$multicurrency_amounts[$cursorfacid] = price2num(GETPOST($key));
$multicurrency_totalpayment += $multicurrency_amounts[$cursorfacid];
if (!empty($multicurrency_amounts[$cursorfacid])) $atleastonepaymentnotnull++;
$result = $tmpinvoice->fetch($cursorfacid);

View File

@ -47,7 +47,7 @@ $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '
$type = GETPOST('type', 'aZ09');
$search_facture = GETPOST('search_facture', 'alpha');
$search_societe = trim(GETPOST('search_societe', 'alpha'));
$search_societe = GETPOST('search_societe', 'alpha');
// Load variable for pagination
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;

View File

@ -62,7 +62,7 @@ $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all',
$search_cti = preg_replace('/^0+/', '', preg_replace('/[^0-9]/', '', GETPOST('search_cti', 'alphanohtml'))); // Phone number without any special chars
$search_phone = GETPOST("search_phone", 'alpha');
$search_id = trim(GETPOST("search_id", "int"));
$search_id = GETPOST("search_id", "int");
$search_firstlast_only = GETPOST("search_firstlast_only", 'alpha');
$search_lastname = GETPOST("search_lastname", 'alpha');
$search_firstname = GETPOST("search_firstname", 'alpha');

View File

@ -50,13 +50,13 @@ $search_name = GETPOST('search_name', 'alpha');
$search_email = GETPOST('search_email', 'alpha');
$search_town = GETPOST('search_town', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
$search_state = trim(GETPOST("search_state", 'alpha'));
$search_state = GETPOST("search_state", 'alpha');
$search_country = GETPOST("search_country", 'int');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
$search_contract = GETPOST('search_contract', 'alpha');
$search_ref_customer = GETPOST('search_ref_customer', 'alpha');
$search_ref_supplier = GETPOST('search_ref_supplier', 'alpha');
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
$sall = (GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml');
$search_status = GETPOST('search_status', 'alpha');
$socid = GETPOST('socid', 'int');
$search_user = GETPOST('search_user', 'int');

View File

@ -44,7 +44,7 @@ if (!empty($actionsave))
$db->begin();
$i += dolibarr_set_const($db, 'CRON_KEY', trim(GETPOST("CRON_KEY")), 'chaine', 0, '', 0);
$i += dolibarr_set_const($db, 'CRON_KEY', GETPOST("CRON_KEY"), 'chaine', 0, '', 0);
if ($i >= 1)
{

View File

@ -120,9 +120,9 @@ if ($action == 'add' && $permtoadd)
}
}
$ref = trim(GETPOST("ref", 'alpha'));
$label = trim(GETPOST("label", 'alpha'));
$desc = trim(GETPOST("desc", 'alpha'));
$ref = GETPOST("ref", 'alpha');
$label = GETPOST("label", 'alpha');
$desc = GETPOST("desc", 'alpha');
$catParent = GETPOST("catParent", 'alpha'); // Can be an int (with ECM) or a string (with generic filemanager)
if ($catParent == '-1') $catParent = 0;

View File

@ -59,7 +59,7 @@ $search_company = GETPOST("search_company", 'alpha');
$search_tracking = GETPOST("search_tracking", 'alpha');
$search_town = GETPOST('search_town', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
$search_state = trim(GETPOST("search_state"));
$search_state = GETPOST("search_state");
$search_country = GETPOST("search_country", 'int');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
$search_billed = GETPOST("search_billed", 'int');
@ -71,7 +71,7 @@ $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all',
$socid = GETPOST('socid', 'int');
$search_user = GETPOST('search_user', 'int');
$search_sale = GETPOST('search_sale', 'int');
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
$search_categ_cus = GETPOST("search_categ_cus", 'int');
$search_product_category = GETPOST('search_product_category', 'int');
$optioncss = GETPOST('optioncss', 'alpha');

View File

@ -66,7 +66,7 @@ $search_refsupp = GETPOST('search_refsupp', 'alpha');
$search_company = GETPOST('search_company', 'alpha');
$search_town = GETPOST('search_town', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
$search_state = trim(GETPOST("search_state", 'alpha'));
$search_state = GETPOST("search_state", 'alpha');
$search_country = GETPOST("search_country", 'int');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
$search_user = GETPOST('search_user', 'int');

View File

@ -94,7 +94,7 @@ $search_status = GETPOST('search_status', 'int');
$search_paymentmode = GETPOST('search_paymentmode', 'int');
$search_town = GETPOST('search_town', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
$search_state = trim(GETPOST("search_state"));
$search_state = GETPOST("search_state");
$search_country = GETPOST("search_country", 'int');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
$search_user = GETPOST('search_user', 'int');

View File

@ -138,7 +138,7 @@ if (empty($reshook))
if (substr($key, 0, 7) == 'amount_')
{
$cursorfacid = substr($key, 7);
$amounts[$cursorfacid] = price2num(trim(GETPOST($key)));
$amounts[$cursorfacid] = price2num(GETPOST($key));
if (!empty($amounts[$cursorfacid])) {
$atleastonepaymentnotnull++;
if (is_numeric($amounts[$cursorfacid])) {
@ -171,7 +171,7 @@ if (empty($reshook))
} elseif (substr($key, 0, 21) == 'multicurrency_amount_')
{
$cursorfacid = substr($key, 21);
$multicurrency_amounts[$cursorfacid] = price2num(trim(GETPOST($key)));
$multicurrency_amounts[$cursorfacid] = price2num(GETPOST($key));
$multicurrency_totalpayment += $multicurrency_amounts[$cursorfacid];
if (!empty($multicurrency_amounts[$cursorfacid])) $atleastonepaymentnotnull++;
$result = $tmpinvoice->fetch($cursorfacid);

View File

@ -144,7 +144,7 @@ if (empty($reshook))
elseif ($endhalfday == 'morning') $halfday = 1;
$valideur = GETPOST('valideur', 'int');
$description = trim(GETPOST('description'));
$description = trim(GETPOST('description', 'none'));
// If no type
if ($type <= 0)

View File

@ -89,7 +89,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -108,7 +108,7 @@ if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default sea
if (!$sortorder) $sortorder = "ASC";
// Initialize array of search criterias
$search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml'));
$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -79,7 +79,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -107,7 +107,7 @@ if ($user->socid > 0) // Protection if external user
// Initialize array of search criterias
$search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml'));
$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -83,7 +83,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -320,7 +320,7 @@ class ActionsCardProduct
if ($field['enabled'])
{
$fieldname = "s".$field['alias'];
$$fieldname = trim(GETPOST($fieldname));
$$fieldname = GETPOST($fieldname);
}
}

View File

@ -59,7 +59,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -64,7 +64,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -81,7 +81,7 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
}
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -97,7 +97,7 @@ $fieldstosearchall = array(
);
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -53,7 +53,7 @@ $search_ref_supplier = GETPOST('search_ref_supplier');
$search_company = GETPOST("search_company");
$search_town = GETPOST('search_town', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
$search_state = trim(GETPOST("search_state"));
$search_state = GETPOST("search_state");
$search_country = GETPOST("search_country", 'int');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
$search_billed = GETPOST("search_billed", 'int');

View File

@ -88,7 +88,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -108,7 +108,7 @@ if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default sea
if (!$sortorder) $sortorder = "ASC";
// Initialize array of search criterias
$search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml'));
$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -89,7 +89,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -89,7 +89,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -108,7 +108,7 @@ if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default sea
if (!$sortorder) $sortorder = "ASC";
// Initialize array of search criterias
$search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml'));
$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -76,7 +76,7 @@ $search_array_options = $extrafields->getOptionalsFromPost($objectwebsiteaccount
unset($objectwebsiteaccount->fields['fk_soc']); // Remove this field, we are already on the thirdparty
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($objectwebsiteaccount->fields as $key => $val)
{

View File

@ -62,7 +62,7 @@ $search_societe = GETPOST('search_societe', 'alpha');
$search_login = GETPOST('search_login', 'alpha');
$search_town = GETPOST('search_town', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
$search_state = trim(GETPOST("search_state"));
$search_state = GETPOST("search_state");
$search_country = GETPOST("search_country", 'int');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
$search_montant_ht = GETPOST('search_montant_ht', 'alpha');

View File

@ -78,7 +78,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{
@ -471,7 +471,7 @@ if (empty($reshook)) {
if ($action == 'setsubject') {
if ($object->fetch(GETPOST('id', 'int'))) {
if ($action == 'setsubject') {
$object->subject = trim(GETPOST('subject', 'alphanohtml'));
$object->subject = GETPOST('subject', 'alphanohtml');
}
if ($action == 'setsubject' && empty($object->subject)) {

View File

@ -129,7 +129,7 @@ if (empty($reshook)) {
setEventMessages($langs->trans("NameNotDefined"), null, 'errors');
$action = "create"; // Go back to create page
} else {
$object->name = trim(GETPOST("nom", 'nohtml'));
$object->name = GETPOST("nom", 'nohtml');
//$object->nom = $object->name; // For backward compatibility
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'none')));
@ -204,7 +204,7 @@ if (empty($reshook)) {
$object->oldcopy = clone $object;
$object->name = trim(GETPOST("nom", 'nohtml'));
$object->name = GETPOST("nom", 'nohtml');
//$object->nom = $object->name; // For backward compatibility
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'none')));

View File

@ -45,8 +45,8 @@ $action = GETPOST('action', 'alpha');
$mode = $dolibarr_main_authentication;
if (!$mode) $mode = 'http';
$username = trim(GETPOST('username', 'alpha'));
$passwordhash = trim(GETPOST('passwordhash', 'alpha'));
$username = GETPOST('username', 'alpha');
$passwordhash = GETPOST('passwordhash', 'alpha');
$conf->entity = (GETPOST('entity', 'int') ? GETPOST('entity', 'int') : 1);
// Instantiate hooks of thirdparty module only if not already define

View File

@ -41,7 +41,7 @@ if ($actionsave)
$db->begin();
$i += dolibarr_set_const($db, 'WEBSERVICES_KEY', trim(GETPOST("WEBSERVICES_KEY")), 'chaine', 0, '', $conf->entity);
$i += dolibarr_set_const($db, 'WEBSERVICES_KEY', GETPOST("WEBSERVICES_KEY"), 'chaine', 0, '', $conf->entity);
if ($i >= 1)
{

View File

@ -51,7 +51,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val)
{

View File

@ -53,7 +53,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val) {
if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha');

View File

@ -93,7 +93,7 @@ if ($user->socid > 0) {
//$result = restrictedArea($user, 'mymodule', $id, '');
// Initialize array of search criterias
$search_all = trim(GETPOST("search_all", 'alpha'));
$search_all = GETPOST("search_all", 'alpha');
$search = array();
foreach ($object->fields as $key => $val) {
if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha');