From dd69aed27bc3b05098f2cd771e37648c16aa0935 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Jan 2021 17:49:08 +0100 Subject: [PATCH] Fix error test --- htdocs/accountancy/admin/index.php | 18 +++++++-------- htdocs/adherents/admin/adherent.php | 2 +- htdocs/adherents/admin/adherent_emails.php | 2 +- htdocs/adherents/admin/website.php | 2 +- htdocs/admin/agenda.php | 2 +- htdocs/admin/agenda_extsites.php | 12 +++++----- htdocs/admin/bank.php | 2 +- htdocs/admin/bom.php | 6 ++--- htdocs/admin/chequereceipts.php | 4 ++-- htdocs/admin/commande.php | 14 ++++++------ htdocs/admin/contract.php | 2 +- htdocs/admin/delivery.php | 4 ++-- htdocs/admin/expensereport.php | 2 +- htdocs/admin/facture.php | 12 +++++----- htdocs/admin/fichinter.php | 14 ++++++------ htdocs/admin/holiday.php | 2 +- htdocs/admin/mailing.php | 12 +++++----- htdocs/admin/mailman.php | 2 +- htdocs/admin/mrp.php | 6 ++--- htdocs/admin/payment.php | 6 ++--- htdocs/admin/paymentbybanktransfer.php | 12 +++++----- htdocs/admin/prelevement.php | 10 ++++----- htdocs/admin/propal.php | 12 +++++----- htdocs/admin/spip.php | 2 +- htdocs/admin/stock.php | 2 +- htdocs/admin/supplier_invoice.php | 4 ++-- htdocs/admin/supplier_order.php | 4 ++-- htdocs/admin/supplier_payment.php | 4 ++-- htdocs/admin/supplier_proposal.php | 8 +++---- htdocs/admin/syslog.php | 4 ++-- htdocs/admin/taxes.php | 10 ++++----- htdocs/admin/ticket.php | 22 +++++++++---------- htdocs/admin/ticket_public.php | 22 +++++++++---------- htdocs/admin/workstation.php | 2 +- htdocs/bookmarks/admin/bookmark.php | 2 +- htdocs/cashdesk/admin/cashdesk.php | 2 +- htdocs/collab/index.php | 2 +- htdocs/comm/remx.php | 2 +- htdocs/core/actions_setmoduleoptions.inc.php | 2 +- htdocs/don/admin/donation.php | 4 ++-- htdocs/modulebuilder/template/admin/setup.php | 2 +- htdocs/paypal/admin/paypal.php | 2 +- htdocs/product/admin/product.php | 6 ++--- htdocs/projet/admin/project.php | 4 ++-- htdocs/recruitment/admin/public_interface.php | 2 +- htdocs/recruitment/admin/setup.php | 2 +- .../recruitment/admin/setup_candidatures.php | 2 +- htdocs/societe/admin/societe.php | 18 +++++++-------- htdocs/takepos/admin/appearance.php | 2 +- htdocs/takepos/admin/other.php | 2 +- htdocs/takepos/admin/receipt.php | 2 +- htdocs/takepos/admin/setup.php | 4 ++-- htdocs/takepos/admin/terminal.php | 2 +- htdocs/website/class/website.class.php | 2 +- htdocs/website/index.php | 2 +- 55 files changed, 156 insertions(+), 156 deletions(-) diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index ae36f0f7fa6..b002fabd0a1 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -100,7 +100,7 @@ if ($action == 'update') { if ($action == 'setlistsorttodo') { $setlistsorttodo = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -114,7 +114,7 @@ if ($action == 'setlistsorttodo') { if ($action == 'setlistsortdone') { $setlistsortdone = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } if (!$error) { @@ -127,7 +127,7 @@ if ($action == 'setlistsortdone') { if ($action == 'setmanagezero') { $setmanagezero = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } if (!$error) { @@ -140,7 +140,7 @@ if ($action == 'setmanagezero') { if ($action == 'setdisabledirectinput') { $setdisabledirectinput = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } if (!$error) { @@ -153,7 +153,7 @@ if ($action == 'setdisabledirectinput') { if ($action == 'setenabledraftexport') { $setenabledraftexport = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL", $setenabledraftexport, 'yesno', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } if (!$error) { @@ -166,7 +166,7 @@ if ($action == 'setenabledraftexport') { if ($action == 'setenablesubsidiarylist') { $setenablesubsidiarylist = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "ACCOUNTANCY_COMBO_FOR_AUX", $setenablesubsidiarylist, 'yesno', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } if (!$error) { @@ -179,7 +179,7 @@ if ($action == 'setenablesubsidiarylist') { if ($action == 'setdisablebindingonsales') { $setdisablebindingonsales = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_SALES", $setdisablebindingonsales, 'yesno', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } if (!$error) { @@ -192,7 +192,7 @@ if ($action == 'setdisablebindingonsales') { if ($action == 'setdisablebindingonpurchases') { $setdisablebindingonpurchases = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_PURCHASES", $setdisablebindingonpurchases, 'yesno', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } if (!$error) { @@ -205,7 +205,7 @@ if ($action == 'setdisablebindingonpurchases') { if ($action == 'setdisablebindingonexpensereports') { $setdisablebindingonexpensereports = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS", $setdisablebindingonexpensereports, 'yesno', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } if (!$error) { diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 8acf1f1b191..fef3bd53177 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -136,7 +136,7 @@ if ($action == 'update' || $action == 'add') { $constnote = GETPOST('constnote'); $res = dolibarr_set_const($db, $constname, $constvalue, $choices[$consttype], 0, $constnote, $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/adherents/admin/adherent_emails.php b/htdocs/adherents/admin/adherent_emails.php index 4374d281895..21ce5037ef5 100644 --- a/htdocs/adherents/admin/adherent_emails.php +++ b/htdocs/adherents/admin/adherent_emails.php @@ -92,7 +92,7 @@ if ($action == 'update' || $action == 'add') { $res = dolibarr_set_const($db, $constname, $constvalue, $typetouse, 0, $constnote, $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index d0cdb098bae..e3acf3c4d99 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -63,7 +63,7 @@ if ($action == 'update') { $res = dolibarr_set_const($db, "MEMBER_NEWFORM_FORCETYPE", $forcetype, 'chaine', 0, '', $conf->entity); } - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index b1cc1d7619b..efdd6213dd5 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -97,7 +97,7 @@ if ($action == "save" && empty($cancel)) if ($search_event === '' || preg_match('/'.preg_quote($search_event, '/').'/i', $keyparam)) { $res = dolibarr_set_const($db, $keyparam, (GETPOST($keyparam, 'alpha') ?GETPOST($keyparam, 'alpha') : ''), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } } diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 7fbd139072d..f99c530c7e2 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -82,15 +82,15 @@ if ($actionsave) //print '-name='.$name.'-color='.$color; $res = dolibarr_set_const($db, 'AGENDA_EXT_NAME'.$i, $name, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $res = dolibarr_set_const($db, 'AGENDA_EXT_SRC'.$i, $src, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $res = dolibarr_set_const($db, 'AGENDA_EXT_OFFSETTZ'.$i, $offsettz, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $res = dolibarr_set_const($db, 'AGENDA_EXT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $res = dolibarr_set_const($db, 'AGENDA_EXT_ENABLED'.$i, $enabled, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $i++; } @@ -98,7 +98,7 @@ if ($actionsave) if (!$error) { $res = dolibarr_set_const($db, 'AGENDA_EXT_NB', trim(GETPOST('AGENDA_EXT_NB', 'int')), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB = 5; $MAXAGENDA = empty($conf->global->AGENDA_EXT_NB) ? 5 : $conf->global->AGENDA_EXT_NB; } diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index d21ffdb1630..4cd7bff4ed8 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -112,7 +112,7 @@ if ($actionsave) if ($color == '-1') $color = ''; $res = dolibarr_set_const($db, 'BANK_COLORIZE_MOVEMENT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $i++; } diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index 34c3af89c53..36b5ab91f67 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -52,7 +52,7 @@ if ($action == 'updateMask') if ($maskconstbom) $res = dolibarr_set_const($db, $maskconstbom, $maskbom, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -141,7 +141,7 @@ elseif ($action == 'setdoc') $draft = GETPOST("BOM_DRAFT_WATERMARK"); $res = dolibarr_set_const($db, "BOM_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -155,7 +155,7 @@ elseif ($action == 'setdoc') $res = dolibarr_set_const($db, "BOM_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php index 8c2acb5dc8b..f00e6454761 100644 --- a/htdocs/admin/chequereceipts.php +++ b/htdocs/admin/chequereceipts.php @@ -55,7 +55,7 @@ if ($action == 'updateMask') $maskchequereceipts = GETPOST('maskchequereceipts', 'alpha'); if ($maskconstchequereceipts) $res = dolibarr_set_const($db, $maskconstchequereceipts, $maskchequereceipts, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -76,7 +76,7 @@ if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT') $res = dolibarr_set_const($db, "BANK_CHEQUERECEIPT_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index cde0253f99a..5e5655f918f 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -61,7 +61,7 @@ if ($action == 'updateMask') if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -146,7 +146,7 @@ elseif ($action == 'setdoc') { $draft = GETPOST("COMMANDE_DRAFT_WATERMARK"); $res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -160,7 +160,7 @@ elseif ($action == 'setdoc') { $res = dolibarr_set_const($db, "ORDER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -172,7 +172,7 @@ elseif ($action == 'setdoc') { // Activate Set Shippable Icon In List $setshippableiconinlist = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -186,7 +186,7 @@ elseif ($action == 'setdoc') { $res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -201,7 +201,7 @@ elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER') { $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_ORDER", $value, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -216,7 +216,7 @@ elseif ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER') { $res = dolibarr_set_const($db, "WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER", $value, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index b5e4c0ddf45..05330e92b89 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -57,7 +57,7 @@ if ($action == 'updateMask') $maskvalue = GETPOST('maskcontract', 'alpha'); if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/admin/delivery.php b/htdocs/admin/delivery.php index b1606268205..9b9060aa054 100644 --- a/htdocs/admin/delivery.php +++ b/htdocs/admin/delivery.php @@ -58,7 +58,7 @@ if ($action == 'updateMask') $maskdelivery = GETPOST('maskdelivery', 'alpha'); if ($maskconstdelivery) $res = dolibarr_set_const($db, $maskconstdelivery, $maskdelivery, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -73,7 +73,7 @@ if ($action == 'set_DELIVERY_FREE_TEXT') $free = GETPOST('DELIVERY_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "DELIVERY_FREE_TEXT", $free, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 61688e18515..ad04e09ffd1 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -61,7 +61,7 @@ if ($action == 'updateMask') { $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 00dcb7c3180..c5b8262c4be 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -66,7 +66,7 @@ if ($action == 'updateMask') if ($maskconstcredit) $res = dolibarr_set_const($db, $maskconstcredit, $maskcredit, 'chaine', 0, '', $conf->entity); if ($maskconstdeposit) $res = dolibarr_set_const($db, $maskconstdeposit, $maskdeposit, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -156,7 +156,7 @@ elseif ($action == 'setdoc') $res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -170,7 +170,7 @@ elseif ($action == 'setdoc') $res = dolibarr_set_const($db, "FACTURE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -184,7 +184,7 @@ elseif ($action == 'setdoc') $res = dolibarr_set_const($db, "INVOICE_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -198,7 +198,7 @@ elseif ($action == 'setdoc') $res = dolibarr_set_const($db, "FAC_FORCE_DATE_VALIDATION", $forcedate, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -217,7 +217,7 @@ elseif ($action == 'setdoc') foreach ($invoicetypemodels as $type => $value) { $res = dolibarr_set_const($db, 'FACTURE_ADDON_PDF_'.intval($type), $value, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } if (!$error) diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index e3178d946a0..afe6bc2239c 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -58,7 +58,7 @@ if ($action == 'updateMask') $maskvalue = GETPOST('maskvalue', 'alpha'); if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -147,7 +147,7 @@ elseif ($action == 'setdoc') $freetext = GETPOST('FICHINTER_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -160,7 +160,7 @@ elseif ($action == 'setdoc') $draft = GETPOST('FICHINTER_DRAFT_WATERMARK', 'alpha'); $res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -173,7 +173,7 @@ elseif ($action == 'setdoc') $val = GETPOST('FICHINTER_PRINT_PRODUCTS', 'alpha'); $res = dolibarr_set_const($db, "FICHINTER_PRINT_PRODUCTS", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -185,7 +185,7 @@ elseif ($action == 'setdoc') $val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha'); $res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -198,7 +198,7 @@ elseif ($action == 'setdoc') $val = GETPOST('FICHINTER_WITHOUT_DURATION', 'alpha'); $res = dolibarr_set_const($db, "FICHINTER_WITHOUT_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -211,7 +211,7 @@ elseif ($action == 'setdoc') $val = GETPOST('FICHINTER_DATE_WITHOUT_HOUR', 'alpha'); $res = dolibarr_set_const($db, "FICHINTER_DATE_WITHOUT_HOUR", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index eca8319d661..d8de2dd847d 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -59,7 +59,7 @@ if ($action == 'updateMask') $maskvalue = GETPOST('maskholiday', 'alpha'); if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index 32aa7accfcf..afec0ca1920 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -52,17 +52,17 @@ if ($action == 'setvalue') $contactbulkdefault = GETPOST('MAILING_CONTACT_DEFAULT_BULK_STATUS', 'int'); $res = dolibarr_set_const($db, "MAILING_EMAIL_FROM", $mailfrom, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $res = dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO", $mailerror, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $res = dolibarr_set_const($db, "MAILING_DELAY", $mailingdelay, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $res = dolibarr_set_const($db, "MAILING_CONTACT_DEFAULT_BULK_STATUS", $contactbulkdefault, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; // Create temporary encryption key if nedded $res = dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY", $checkread_key, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) @@ -77,7 +77,7 @@ if ($action == 'setvalue') if ($action == 'setonsearchandlistgooncustomerorsuppliercard') { $setonsearchandlistgooncustomerorsuppliercard = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard, 'yesno', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/admin/mailman.php b/htdocs/admin/mailman.php index 8070beab59b..3c9c634a8cd 100644 --- a/htdocs/admin/mailman.php +++ b/htdocs/admin/mailman.php @@ -59,7 +59,7 @@ if ($action == 'update' || $action == 'add') $constnote = $_POST["constnote"][$key]; $res = dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } if (!$error) diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php index af6210eee1f..a5ae9d15e63 100644 --- a/htdocs/admin/mrp.php +++ b/htdocs/admin/mrp.php @@ -53,7 +53,7 @@ if ($action == 'updateMask') if ($maskconstmrp) $res = dolibarr_set_const($db, $maskconstmrp, $maskmrp, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -142,7 +142,7 @@ elseif ($action == 'setdoc') $draft = GETPOST("MRP_MO_DRAFT_WATERMARK"); $res = dolibarr_set_const($db, "MRP_MO_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -156,7 +156,7 @@ elseif ($action == 'setdoc') $res = dolibarr_set_const($db, "MRP_MO_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index 378e1b4fe68..925c8fd6ff4 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -51,7 +51,7 @@ if ($action == 'updateMask') $maskpayment = GETPOST('maskpayment', 'alpha'); if ($maskconstpayment) $res = dolibarr_set_const($db, $maskconstpayment, $maskpayment, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -70,10 +70,10 @@ if ($action == 'setparams') { $freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS', 'restricthtml'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $res = dolibarr_set_const($db, "PAYMENTS_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if ($error) { diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php index a21b2aa6e1d..1214dd671c4 100644 --- a/htdocs/admin/paymentbybanktransfer.php +++ b/htdocs/admin/paymentbybanktransfer.php @@ -53,7 +53,7 @@ if ($action == "set") if ($account->fetch($id) > 0) { $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; /* $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; @@ -73,29 +73,29 @@ if ($action == "set") } else $error++; /* Moved to account $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ICS", GETPOST("PAYMENTBYBANKTRANSFER_ICS"), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; */ if (GETPOST("PAYMENTBYBANKTRANSFER_USER") > 0) { $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USER", GETPOST("PAYMENTBYBANKTRANSFER_USER"), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } /* if (GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END") || GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END") == "") { $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_END_TO_END", GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END"), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } if (GETPOST("PAYMENTBYBANKTRANSFER_USTRD") || GETPOST("PAYMENTBYBANKTRANSFER_USTRD") == "") { $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USTRD", GETPOST("PAYMENTBYBANKTRANSFER_USTRD"), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } */ if (GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS") || GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS") == "") { $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ADDDAYS", GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS"), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } elseif (!$error) { $db->commit(); diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 1d6d35c8719..00837a222b9 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -55,7 +55,7 @@ if ($action == "set") if ($account->fetch($id) > 0) { $res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; /* $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; @@ -77,19 +77,19 @@ if ($action == "set") /* Moved to account $res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; */ if (GETPOST("PRELEVEMENT_USER") > 0) { $res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } if (GETPOST("PRELEVEMENT_END_TO_END") || GETPOST("PRELEVEMENT_END_TO_END") == "") { $res = dolibarr_set_const($db, "PRELEVEMENT_END_TO_END", GETPOST("PRELEVEMENT_END_TO_END"), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } if (GETPOST("PRELEVEMENT_USTRD") || GETPOST("PRELEVEMENT_USTRD") == "") { $res = dolibarr_set_const($db, "PRELEVEMENT_USTRD", GETPOST("PRELEVEMENT_USTRD"), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } $res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity); diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 78c22e7b397..6d80aa78211 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -57,7 +57,7 @@ if ($action == 'updateMask') { $maskpropal = GETPOST('maskpropal', 'alpha'); if ($maskconstpropal) $res = dolibarr_set_const($db, $maskconstpropal, $maskpropal, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -109,7 +109,7 @@ if ($action == 'updateMask') { $res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -121,7 +121,7 @@ if ($action == 'updateMask') { $draft = GETPOST('PROPALE_DRAFT_WATERMARK', 'alpha'); $res = dolibarr_set_const($db, "PROPALE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -134,7 +134,7 @@ if ($action == 'updateMask') { $res = dolibarr_set_const($db, "PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -145,7 +145,7 @@ if ($action == 'updateMask') { } elseif ($action == 'setdefaultduration') { $res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION", $value, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -156,7 +156,7 @@ if ($action == 'updateMask') { } elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') { $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL", $value, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/admin/spip.php b/htdocs/admin/spip.php index 2fa111578a9..018fb70a80d 100644 --- a/htdocs/admin/spip.php +++ b/htdocs/admin/spip.php @@ -67,7 +67,7 @@ if ($action == 'update' || $action == 'add') $res = dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } if (!$error) diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index db7f005284f..fa4676bc6ce 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -96,7 +96,7 @@ if ($action == 'warehouse') if ($value == -1 || empty($value) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) { $res = dolibarr_del_const($db, "MAIN_DEFAULT_WAREHOUSE", $conf->entity); } - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } if ($action == 'specimen') diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 86faa655687..b7a14a53541 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -65,7 +65,7 @@ if ($action == 'updateMask') if ($maskconstinvoice) $res = dolibarr_set_const($db, $maskconstinvoice, $maskinvoice, 'chaine', 0, '', $conf->entity); if ($maskconstcredit) $res = dolibarr_set_const($db, $maskconstcredit, $maskcredit, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -170,7 +170,7 @@ if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT') $res = dolibarr_set_const($db, "SUPPLIER_INVOICE_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index e2433c5348b..f255a77348a 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -63,7 +63,7 @@ if ($action == 'updateMask') if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskvalue, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -194,7 +194,7 @@ elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER') { $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER", $value, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 3408496de31..c0e0d650d90 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -52,7 +52,7 @@ if ($action == 'updateMask') $masksupplierpayment = GETPOST('masksupplierpayment', 'alpha'); if ($maskconstsupplierpayment) $res = dolibarr_set_const($db, $maskconstsupplierpayment, $masksupplierpayment, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -136,7 +136,7 @@ elseif ($action == 'setdoc') } elseif ($action == 'setparams') { $res = dolibarr_set_const($db, "PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if ($error) { diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 0855a41cf8f..dac0a733782 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -55,7 +55,7 @@ if ($action == 'updateMask') $masksupplier_proposal = GETPOST('masksupplier_proposal', 'alpha'); if ($maskconstsupplier_proposal) $res = dolibarr_set_const($db, $maskconstsupplier_proposal, $masksupplier_proposal, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -111,7 +111,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK') $draft = GETPOST('SUPPLIER_PROPOSAL_DRAFT_WATERMARK', 'alpha'); $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -127,7 +127,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT') $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -141,7 +141,7 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL') { $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL", $value, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 45500843aed..c884e30da75 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -138,7 +138,7 @@ if ($action == 'setlevel') $res = dolibarr_set_const($db, "SYSLOG_LEVEL", $level, 'chaine', 0, '', 0); dol_syslog("admin/syslog: level ".$level); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -146,7 +146,7 @@ if ($action == 'setlevel') $res = dolibarr_set_const($db, "SYSLOG_FILE_SAVES", $file_saves, 'chaine', 0, '', 0); dol_syslog("admin/syslog: file saves ".$file_saves); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } if (!$error) diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 0963a264c52..4efc95061d4 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -65,7 +65,7 @@ if ($action == 'update') { $db->begin(); $res = dolibarr_set_const($db, 'TAX_MODE', $tax_mode, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; switch ($tax_mode) { @@ -90,13 +90,13 @@ if ($action == 'update') { } $res = dolibarr_set_const($db, 'TAX_MODE_SELL_PRODUCT', $valuesellproduct, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $res = dolibarr_set_const($db, 'TAX_MODE_BUY_PRODUCT', $valuebuyproduct, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $res = dolibarr_set_const($db, 'TAX_MODE_SELL_SERVICE', $valuesellservice, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; $res = dolibarr_set_const($db, 'TAX_MODE_BUY_SERVICE', $valuebuyservice, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; dolibarr_set_const($db, "MAIN_INFO_TVAINTRA", GETPOST("tva", 'alpha'), 'chaine', 0, '', $conf->entity); diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index f7e72f53e7e..690fee6a222 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -59,7 +59,7 @@ if ($action == 'updateMask') { $res = dolibarr_set_const($db, $maskconstticket, $maskticket, 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -113,7 +113,7 @@ elseif ($action == 'setmod') { } else { $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', '', 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -124,7 +124,7 @@ elseif ($action == 'setmod') { } else { $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', '', 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -134,7 +134,7 @@ elseif ($action == 'setmod') { } else { $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $langs->trans('TicketMessageMailIntroText'), 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -144,7 +144,7 @@ elseif ($action == 'setmod') { } else { $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $langs->trans('TicketMessageMailSignatureText'), 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } } @@ -152,13 +152,13 @@ elseif ($action == 'setmod') { if ($action == 'setvarother') { $param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } $param_disable_email = GETPOST('TICKET_DISABLE_NOTIFICATION_MAILS', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_DISABLE_NOTIFICATION_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -166,7 +166,7 @@ if ($action == 'setvarother') { { $param_show_module_logo = GETPOST('TICKET_SHOW_MODULE_LOGO', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } } @@ -175,20 +175,20 @@ if ($action == 'setvarother') { { $param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } } $param_limit_view = GETPOST('TICKET_LIMIT_VIEW_ASSIGNED_ONLY', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } $param_auto_assign = GETPOST('TICKET_AUTO_ASSIGN_USER_CREATE', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } } diff --git a/htdocs/admin/ticket_public.php b/htdocs/admin/ticket_public.php index 80f458a2b5c..2bbf620b3c6 100644 --- a/htdocs/admin/ticket_public.php +++ b/htdocs/admin/ticket_public.php @@ -63,7 +63,7 @@ if ($action == 'setvar') { } else { $res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', '', 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -73,7 +73,7 @@ if ($action == 'setvar') { } else { $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $langs->trans('TicketPublicInterfaceTextHome'), 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -83,7 +83,7 @@ if ($action == 'setvar') { } else { $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -93,7 +93,7 @@ if ($action == 'setvar') { } else { $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $langs->trans('TicketMessageMailNewText'), 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -103,13 +103,13 @@ if ($action == 'setvar') { } else { $res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', '', 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } $param_public_notification_new_message_default_email = GETPOST('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL', $param_public_notification_new_message_default_email, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } } @@ -117,25 +117,25 @@ if ($action == 'setvar') { if ($action == 'setvarother') { $param_enable_public_interface = GETPOST('TICKET_ENABLE_PUBLIC_INTERFACE', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_ENABLE_PUBLIC_INTERFACE', $param_enable_public_interface, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } $param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } $param_disable_email = GETPOST('TICKET_DISABLE_CUSTOMER_MAILS', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_DISABLE_CUSTOMER_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } $param_show_module_logo = GETPOST('TICKET_SHOW_COMPANY_LOGO', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_SHOW_COMPANY_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -143,7 +143,7 @@ if ($action == 'setvarother') { { $param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha'); $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } } diff --git a/htdocs/admin/workstation.php b/htdocs/admin/workstation.php index 502a573e98b..98d72bf9f00 100755 --- a/htdocs/admin/workstation.php +++ b/htdocs/admin/workstation.php @@ -67,7 +67,7 @@ if ($action == 'updateMask') if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index c049d4af16f..5f30db5d7f2 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -38,7 +38,7 @@ if ($action == 'setvalue') { $showmenu = GETPOST('BOOKMARKS_SHOW_IN_MENU', 'alpha'); $res = dolibarr_set_const($db, "BOOKMARKS_SHOW_IN_MENU", $showmenu, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 5f0e9baddf5..21e10c05fc7 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -62,7 +62,7 @@ if (GETPOST('action', 'alpha') == 'set') dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/collab/index.php b/htdocs/collab/index.php index 7353ea881ee..e5fe22c9168 100644 --- a/htdocs/collab/index.php +++ b/htdocs/collab/index.php @@ -114,7 +114,7 @@ if ($action == 'delete') if ($res > 0) { $res = $objectpage->delete($user); - if (!$res > 0) + if (!($res > 0)) { $error++; setEventMessages($objectpage->error, $objectpage->errors, 'errors'); diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 57c1cf40114..e2900858c84 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -70,7 +70,7 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes') $remid = (GETPOST("remid", 'int') ? GETPOST("remid", 'int') : 0); $discount = new DiscountAbsolute($db); $res = $discount->fetch($remid); - if (!$res > 0) + if (!($res > 0)) { $error++; setEventMessages($langs->trans("ErrorFailedToLoadDiscount"), null, 'errors'); diff --git a/htdocs/core/actions_setmoduleoptions.inc.php b/htdocs/core/actions_setmoduleoptions.inc.php index 31af34e3ad1..d662d3c85c9 100644 --- a/htdocs/core/actions_setmoduleoptions.inc.php +++ b/htdocs/core/actions_setmoduleoptions.inc.php @@ -73,7 +73,7 @@ if ($action == 'setModuleOptions') if ($param) { $res = dolibarr_set_const($db, $param, $value, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } } } diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index 78a3d50dfcc..7b0896134e0 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -118,7 +118,7 @@ if ($action == 'set_DONATION_ACCOUNTINGACCOUNT') $res = dolibarr_set_const($db, "DONATION_ACCOUNTINGACCOUNT", $account, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -134,7 +134,7 @@ if ($action == 'set_DONATION_MESSAGE') $res = dolibarr_set_const($db, "DONATION_MESSAGE", $freemessage, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index 417eb5a4e0f..058f15baae3 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -85,7 +85,7 @@ if ($action == 'updateMask') { $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); } - if (!$res > 0) { + if (!($res > 0)) { $error++; } diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index 5ab913f7ce9..b16748f66b4 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -92,7 +92,7 @@ if ($action == "setlive") { $liveenable = GETPOST('value', 'int') ? 0 : 1; $res = dolibarr_set_const($db, "PAYPAL_API_SANDBOX", $liveenable, 'yesno', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 25c5c8b1142..f268003e1bb 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -89,12 +89,12 @@ if ($action == 'setcodeproduct') if ($action == 'other' && GETPOST('value_PRODUIT_LIMIT_SIZE') >= 0) { $res = dolibarr_set_const($db, "PRODUIT_LIMIT_SIZE", GETPOST('value_PRODUIT_LIMIT_SIZE'), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } if ($action == 'other' && GETPOST('value_PRODUIT_MULTIPRICES_LIMIT') > 0) { $res = dolibarr_set_const($db, "PRODUIT_MULTIPRICES_LIMIT", GETPOST('value_PRODUIT_MULTIPRICES_LIMIT'), 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } if ($action == 'other') { @@ -252,7 +252,7 @@ if ($action == 'set') $value = GETPOST('value'); if (GETPOST('value', 'alpha')) $res = dolibarr_set_const($db, $const, $value, 'chaine', 0, '', $conf->entity); else $res = dolibarr_del_const($db, $const, $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; } //if ($action == 'other') diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index a46c64464f8..f36aae34c4f 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -58,7 +58,7 @@ if ($action == 'updateMask') if ($maskconstproject) $res = dolibarr_set_const($db, $maskconstproject, $maskproject, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -75,7 +75,7 @@ if ($action == 'updateMaskTask') if ($maskconstmasktask) $res = dolibarr_set_const($db, $maskconstmasktask, $masktaskt, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/recruitment/admin/public_interface.php b/htdocs/recruitment/admin/public_interface.php index a457c2a4427..31925608811 100644 --- a/htdocs/recruitment/admin/public_interface.php +++ b/htdocs/recruitment/admin/public_interface.php @@ -52,7 +52,7 @@ if ($action == 'update') { $res = dolibarr_set_const($db, "RECRUITMENT_ENABLE_PUBLIC_INTERFACE", $public, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/recruitment/admin/setup.php b/htdocs/recruitment/admin/setup.php index 342d32840c5..1c2d76ffd40 100644 --- a/htdocs/recruitment/admin/setup.php +++ b/htdocs/recruitment/admin/setup.php @@ -83,7 +83,7 @@ if ($action == 'updateMask') if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/recruitment/admin/setup_candidatures.php b/htdocs/recruitment/admin/setup_candidatures.php index 818e1479f0a..9bc3cd96d5a 100644 --- a/htdocs/recruitment/admin/setup_candidatures.php +++ b/htdocs/recruitment/admin/setup_candidatures.php @@ -83,7 +83,7 @@ if ($action == 'updateMask') if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 49b58d61d08..aa738f0845b 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -75,7 +75,7 @@ if ($action == 'updateoptions') { $companysearch = GETPOST('activate_COMPANY_USE_SEARCH_TO_SELECT', 'alpha'); $res = dolibarr_set_const($db, "COMPANY_USE_SEARCH_TO_SELECT", $companysearch, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -88,7 +88,7 @@ if ($action == 'updateoptions') { $contactsearch = GETPOST('activate_CONTACT_USE_SEARCH_TO_SELECT', 'alpha'); $res = dolibarr_set_const($db, "CONTACT_USE_SEARCH_TO_SELECT", $contactsearch, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -101,7 +101,7 @@ if ($action == 'updateoptions') { $customertypedefault = GETPOST('defaultcustomertype', 'int'); $res = dolibarr_set_const($db, "THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT", $customertypedefault, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -176,7 +176,7 @@ if ($action == 'setdoc') if ($action == "setaddrefinlist") { $setaddrefinlist = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "SOCIETE_ADD_REF_IN_LIST", $setaddrefinlist, 'yesno', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -189,7 +189,7 @@ if ($action == "setaddrefinlist") { if ($action == "setaddadressinlist") { $val = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "COMPANY_SHOW_ADDRESS_SELECTLIST", $val, 'yesno', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -202,7 +202,7 @@ if ($action == "setaddadressinlist") { if ($action == "setaddemailphonetownincontactlist") { $val = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "CONTACT_SHOW_EMAIL_PHONE_TOWN_SELECTLIST", $val, 'yesno', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -214,7 +214,7 @@ if ($action == "setaddemailphonetownincontactlist") { if ($action == "setaskforshippingmet") { $setaskforshippingmet = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "SOCIETE_ASK_FOR_SHIPPING_METHOD", $setaskforshippingmet, 'yesno', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -227,7 +227,7 @@ if ($action == "setaskforshippingmet") { if ($action == "setdisableprospectcustomer") { $setdisableprospectcustomer = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "SOCIETE_DISABLE_PROSPECTSCUSTOMERS", $setdisableprospectcustomer, 'yesno', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -297,7 +297,7 @@ if ($action == 'sethideinactivethirdparty') if ($action == 'setonsearchandlistgooncustomerorsuppliercard') { $setonsearchandlistgooncustomerorsuppliercard = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard, 'yesno', 0, '', $conf->entity); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/takepos/admin/appearance.php b/htdocs/takepos/admin/appearance.php index baceed47f3e..eb956ea9f32 100644 --- a/htdocs/takepos/admin/appearance.php +++ b/htdocs/takepos/admin/appearance.php @@ -47,7 +47,7 @@ if (GETPOST('action', 'alpha') == 'set') dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/takepos/admin/other.php b/htdocs/takepos/admin/other.php index 6874665ace7..e0beeedf502 100644 --- a/htdocs/takepos/admin/other.php +++ b/htdocs/takepos/admin/other.php @@ -86,7 +86,7 @@ if (GETPOST('action', 'alpha') == 'set') { dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { $db->commit(); diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php index 30a9d45ad5a..01873d317c4 100644 --- a/htdocs/takepos/admin/receipt.php +++ b/htdocs/takepos/admin/receipt.php @@ -52,7 +52,7 @@ if (GETPOST('action', 'alpha') == 'set') dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 84efe32839e..f3c17f6ee23 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -85,7 +85,7 @@ if ($action == 'set') dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { @@ -97,7 +97,7 @@ if ($action == 'set') $maskconst = GETPOST('maskconst', 'alpha'); $maskvalue = GETPOST('maskvalue', 'alpha'); if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } } elseif ($action == 'setrefmod') { diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index d8ad03a057c..ed4ef31af36 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -101,7 +101,7 @@ if (GETPOST('action', 'alpha') == 'set') dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!$res > 0) $error++; + if (!($res > 0)) $error++; if (!$error) { diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 42b39e7e902..2d477ec41b9 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -757,7 +757,7 @@ class Website extends CommonObject // Restore id of home page $object->fk_default_home = $newidforhome; $res = $object->update($user); - if (!$res > 0) + if (!($res > 0)) { $error++; setEventMessages($object->error, $object->errors, 'errors'); diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 9aa556b9fe3..3979dc90fbe 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1576,7 +1576,7 @@ if ($action == 'setashome') $object->fk_default_home = $pageid; $res = $object->update($user); - if (!$res > 0) + if (! ($res > 0)) { $error++; setEventMessages($object->error, $object->errors, 'errors');