mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix bad test
This commit is contained in:
parent
f7e637a552
commit
452aea1d8b
|
|
@ -103,8 +103,9 @@ 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++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
|
@ -116,8 +117,10 @@ 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) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -128,8 +131,10 @@ 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) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -140,8 +145,10 @@ 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) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -152,8 +159,10 @@ 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) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -164,8 +173,10 @@ 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) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -176,8 +187,10 @@ 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) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -188,8 +201,10 @@ 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) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -200,8 +215,10 @@ 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) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -209,9 +226,11 @@ if ($action == 'setdisablebindingonexpensereports') {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans('ConfigAccountingExpert');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,9 @@ 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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,15 +51,17 @@ if ($action == 'setvalue')
|
|||
$mailingdelay = GETPOST('MAILING_DELAY', '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++;
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
|
||||
$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();
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
|
|
@ -75,7 +75,7 @@ if ($action == "set")
|
|||
} else $error++;
|
||||
|
||||
$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);
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -76,17 +76,18 @@ if ((float) DOL_VERSION >= 6)
|
|||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
}
|
||||
|
||||
if ($action == 'updateMask')
|
||||
{
|
||||
if ($action == 'updateMask') {
|
||||
$maskconstorder = GETPOST('maskconstorder', 'alpha');
|
||||
$maskorder = GETPOST('maskorder', 'alpha');
|
||||
|
||||
if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity);
|
||||
if ($maskconstorder) {
|
||||
$res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
{
|
||||
|
|
@ -249,7 +249,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')
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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') {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user