Merge pull request #21044 from defrance/patch-195

php V8 warning ($conf->c part 1
This commit is contained in:
Laurent Destailleur 2022-06-02 15:44:04 +02:00 committed by GitHub
commit a579859ab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 25 deletions

View File

@ -1185,7 +1185,7 @@ if ($action == 'create') {
$formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200');
print '</td></tr>';
if ($conf->categorie->enabled) {
if (!empty($conf->categorie->enabled)) {
// Categories
print '<tr><td>'.$langs->trans("Categories").'</td><td>';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_ACTIONCOMM, '', 'parent', 64, 0, 1);
@ -1201,7 +1201,7 @@ if ($action == 'create') {
print '<table class="border centpercent">';
if ($conf->societe->enabled) {
if (!empty($conf->societe->enabled)) {
// Related company
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ActionOnCompany").'</td><td>';
if (GETPOST('socid', 'int') > 0) {
@ -1693,7 +1693,7 @@ if ($id > 0) {
print '</td></tr>';
// Tags-Categories
if ($conf->categorie->enabled) {
if (!empty($conf->categorie->enabled)) {
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_ACTIONCOMM, '', 'parent', 64, 0, 1);
$c = new Categorie($db);
@ -1714,7 +1714,7 @@ if ($id > 0) {
print '<table class="border tableforfield centpercent">';
if ($conf->societe->enabled) {
if (!empty($conf->societe->enabled)) {
// Related company
print '<tr><td class="titlefieldcreate">'.$langs->trans("ActionOnCompany").'</td>';
print '<td>';
@ -2099,7 +2099,7 @@ if ($id > 0) {
}
// Categories
if ($conf->categorie->enabled) {
if (!empty($conf->categorie->enabled)) {
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
print $form->showCategories($object->id, Categorie::TYPE_ACTIONCOMM, 1);
print "</td></tr>";
@ -2114,7 +2114,7 @@ if ($id > 0) {
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield centpercent">';
if ($conf->societe->enabled) {
if (!empty($conf->societe->enabled)) {
// Related company
print '<tr><td class="titlefield">'.$langs->trans("ActionOnCompany").'</td><td>'.($object->thirdparty->id ? $object->thirdparty->getNomUrl(1) : ('<span class="opacitymedium">'.$langs->trans("None").'</span>'));
if (is_object($object->thirdparty) && $object->thirdparty->id > 0 && $object->type_code == 'AC_TEL') {

View File

@ -2791,7 +2791,7 @@ if ($action == 'create') {
}
// Create contract
if ($conf->contrat->enabled && $object->statut == Propal::STATUS_SIGNED) {
if (!empty($conf->contrat->enabled) && $object->statut == Propal::STATUS_SIGNED) {
$langs->load("contracts");
if ($usercancreatecontract) {

View File

@ -2748,7 +2748,7 @@ if ($action == 'create' && $usercancreate) {
}
// Create contract
if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)) {
if (!empty($conf->contrat->enabled) && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)) {
$langs->load("contracts");
if ($user->rights->contrat->creer) {

View File

@ -7,6 +7,7 @@
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2022 Charlene Benke <charlene@patas-monkey.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -436,7 +437,7 @@ if ($action == 'create') {
print '</td></tr>';
// Tags-Categories
if ($conf->categorie->enabled) {
if (!empty($conf->categorie->enabled)) {
print '<tr><td>'.$langs->trans("Categories").'</td><td>';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_ACCOUNT, '', 'parent', 64, 0, 1);
@ -713,7 +714,7 @@ if ($action == 'create') {
print '<table class="border tableforfield centpercent">';
// Categories
if ($conf->categorie->enabled) {
if (!empty($conf->categorie->enabled)) {
print '<tr><td class="titlefield">'.$langs->trans("Categories").'</td><td>';
print $form->showCategories($object->id, Categorie::TYPE_ACCOUNT, 1);
print "</td></tr>";
@ -966,7 +967,7 @@ if ($action == 'create') {
print '</td></tr>';
// Tags-Categories
if ($conf->categorie->enabled) {
if (!empty($conf->categorie->enabled)) {
print '<tr><td>'.$langs->trans("Categories").'</td><td>';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_ACCOUNT, '', 'parent', 64, 0, 1);
$c = new Categorie($db);
@ -1082,12 +1083,12 @@ if ($action == 'create') {
print '<tr><td>'.$langs->trans($bickey).'</td>';
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="11" type="text" class="flat" name="bic" value="'.(GETPOSTISSET('bic') ? GETPOST('bic', 'alphanohtml') : $object->bic).'"></td></tr>';
if ($conf->prelevement->enabled) {
if (!empty($conf->prelevement->enabled)) {
print '<tr><td>'.$form->textwithpicto($langs->trans("ICS"), $langs->trans("ICS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("StandingOrder")).')').'</td>';
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics" value="'.(GETPOSTISSET('ics') ? GETPOST('ics', 'alphanohtml') : $object->ics).'"></td></tr>';
}
if ($conf->paymentbybanktransfer->enabled) {
if (!empty($conf->paymentbybanktransfer->enabled)) {
print '<tr><td>'.$form->textwithpicto($langs->trans("IDS"), $langs->trans("IDS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("BankTransfer")).')').'</td>';
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics_transfer" value="'.(GETPOSTISSET('ics_transfer') ? GETPOST('ics_transfer', 'alphanohtml') : $object->ics_transfer).'"></td></tr>';

View File

@ -5426,7 +5426,7 @@ if ($action == 'create') {
// Create contract
if (!empty($conf->global->CONTRACT_CREATE_FROM_INVOICE)) {
if ($conf->contrat->enabled && $object->statut == Facture::STATUS_VALIDATED) {
if (!empty($conf->contrat->enabled) && $object->statut == Facture::STATUS_VALIDATED) {
$langs->load("contracts");
if ($usercancreatecontract) {

View File

@ -4,7 +4,8 @@
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015-2017 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015-2017 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2022 Charlene Benke <charlene@patas-monkey.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1611,36 +1612,36 @@ class FormMail extends Form
if ($onlinepaymentenabled && !empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
$tmparray['__SECUREKEYPAYMENT__'] = $conf->global->PAYMENT_SECURITY_TOKEN;
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
if ($conf->adherent->enabled) {
if (!empty($conf->adherent->enabled)) {
$tmparray['__SECUREKEYPAYMENT_MEMBER__'] = 'SecureKeyPAYMENTUniquePerMember';
}
if ($conf->don->enabled) {
if (!empty($conf->don->enabled)) {
$tmparray['__SECUREKEYPAYMENT_DONATION__'] = 'SecureKeyPAYMENTUniquePerDonation';
}
if ($conf->facture->enabled) {
if (!empty($conf->facture->enabled)) {
$tmparray['__SECUREKEYPAYMENT_INVOICE__'] = 'SecureKeyPAYMENTUniquePerInvoice';
}
if ($conf->commande->enabled) {
if (!empty($conf->commande->enabled)) {
$tmparray['__SECUREKEYPAYMENT_ORDER__'] = 'SecureKeyPAYMENTUniquePerOrder';
}
if ($conf->contrat->enabled) {
if (!empty($conf->contrat->enabled)) {
$tmparray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = 'SecureKeyPAYMENTUniquePerContractLine';
}
//Online payement link
if ($conf->adherent->enabled) {
if (!empty($conf->adherent->enabled)) {
$tmparray['__ONLINEPAYMENTLINK_MEMBER__'] = 'OnlinePaymentLinkUniquePerMember';
}
if ($conf->don->enabled) {
if (!empty($conf->don->enabled)) {
$tmparray['__ONLINEPAYMENTLINK_DONATION__'] = 'OnlinePaymentLinkUniquePerDonation';
}
if ($conf->facture->enabled) {
if (!empty($conf->facture->enabled)) {
$tmparray['__ONLINEPAYMENTLINK_INVOICE__'] = 'OnlinePaymentLinkUniquePerInvoice';
}
if ($conf->commande->enabled) {
if (!empty($conf->commande->enabled)) {
$tmparray['__ONLINEPAYMENTLINK_ORDER__'] = 'OnlinePaymentLinkUniquePerOrder';
}
if ($conf->contrat->enabled) {
if (!empty($conf->contrat->enabled)) {
$tmparray['__ONLINEPAYMENTLINK_CONTRACTLINE__'] = 'OnlinePaymentLinkUniquePerContractLine';
}
}