Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
PHP 8.2 corrections de Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
warnerbryce committed Oct 16, 2023
1 parent a28d51f commit d0b9296
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
18 changes: 12 additions & 6 deletions admin/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,31 +377,35 @@
print '<td>'.$langs->trans("ECommerceShippingService").'</td>'."\n";
print '<td>' . $langs->transnoentities("ECommerceShippingServiceDescription") . '</td>' . "\n";
print '<td class="right">' . "\n";
print $form->select_produits($object->parameters['shipping_service'], 'shipping_service', 1, 0) . "\n";
$p_shippingservice = !empty($object->parameters['shipping_service']) ? $object->parameters['shipping_service'] : '';
print $form->select_produits($p_shippingservice, 'shipping_service', 1, 0) . "\n";
print '</td></tr>' . "\n";

// Discount code service
print '<tr class="oddeven">' . "\n";
print '<td>'.$langs->trans("ECommerceDiscountCodeService").'</td>'."\n";
print '<td>' . $langs->transnoentities("ECommerceDiscountCodeServiceDescription") . '</td>' . "\n";
print '<td class="right">' . "\n";
print $form->select_produits($object->parameters['discount_code_service'], 'discount_code_service', 1, 0) . "\n";
$p_discountcode = !empty($object->parameters['discount_code_service']) ? $object->parameters['discount_code_service'] : '';
print $form->select_produits($p_discountcode, 'discount_code_service', 1, 0) . "\n";
print '</td></tr>' . "\n";

// PW gift cards service
print '<tr class="oddeven">' . "\n";
print '<td>'.$langs->trans("ECommercePwGiftCardsService").'</td>'."\n";
print '<td>' . $langs->transnoentities("ECommercePwGiftCardsServiceDescription") . '</td>' . "\n";
print '<td class="right">' . "\n";
print $form->select_produits($object->parameters['pw_gift_cards_service'], 'pw_gift_cards_service', 1, 0) . "\n";
$p_pwgiftcardservice = !empty($object->parameters['pw_gift_cards_service']) ? $object->parameters['pw_gift_cards_service'] : '';
print $form->select_produits($p_pwgiftcardservice, 'pw_gift_cards_service', 1, 0) . "\n";
print '</td></tr>' . "\n";

// ACFW store credits service
print '<tr class="oddeven">' . "\n";
print '<td>'.$langs->trans("ECommerceAcfwStoreCreditsService").'</td>'."\n";
print '<td>' . $langs->transnoentities("ECommerceAcfwStoreCreditsServiceDescription") . '</td>' . "\n";
print '<td class="right">' . "\n";
print $form->select_produits($object->parameters['acfw_store_credits_service'], 'acfw_store_credits_service', 1, 0) . "\n";
$p_acfwstorecreditsservice = !empty($object->parameters['acfw_store_credits_service']) ? $object->parameters['acfw_store_credits_service'] : '';
print $form->select_produits($p_acfwstorecreditsservice, 'acfw_store_credits_service', 1, 0) . "\n";
print '</td></tr>' . "\n";

// Fee service
Expand All @@ -410,7 +414,8 @@
print '<td>' . $langs->trans("ECommerceFeeService") . '</td>' . "\n";
print '<td>' . $langs->transnoentities("ECommerceFeeServiceDescription") . '</td>' . "\n";
print '<td class="right">' . "\n";
print $form->select_produits($object->parameters['fee_service'], 'fee_service', 1, 0) . "\n";
$p_feeservice = !empty($object->parameters['fee_service']) ? $object->parameters['fee_service'] : '';
print $form->select_produits($p_feeservice, 'fee_service', 1, 0) . "\n";
print '</td></tr>' . "\n";
}

Expand Down Expand Up @@ -629,7 +634,8 @@
print '<td>'.$langs->trans('ECOMMERCE_' . $const_name).'</td>'."\n";
print '<td>' . $langs->transnoentities('DefaultValue') . ' : ' . (empty($conf->global->$const_name) || $conf->global->$const_name == -1 ? $langs->trans('NotDefined') : $conf->global->$const_name) . '</td>' . "\n";
print '<td class="right">' . "\n";
print $formaccounting->select_account($object->parameters['default_account'][$key], $key, 1, '', 1, 1);
$p_defaultaccount = !empty($object->parameters['default_account'][$key]) ? $object->parameters['default_account'][$key] : '';
print $formaccounting->select_account($p_defaultaccount, $key, 1, '', 1, 1);
print '</td></tr>' . "\n";
}
}
Expand Down
6 changes: 4 additions & 2 deletions admin/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@
print '<td>' . $langs->transnoentities("ECommerceSiteWebHooksSecretDescription") . '</td>' . "\n";
print '<td class="right">' . "\n";
print '<table class="nobordernopadding centpercent"><tr><td>' . "\n";
print '<input type="text" class="flat centpercent" id="site_web_hooks_secret" name="site_web_hooks_secret" value="' . dol_escape_htmltag($object->parameters['web_hooks_secret']) . '">' . "\n";
$p_webhooksecret = !empty($object->parameters['web_hooks_secret']) ? $object->parameters['web_hooks_secret'] : '';
print '<input type="text" class="flat centpercent" id="site_web_hooks_secret" name="site_web_hooks_secret" value="' . dol_escape_htmltag($p_webhooksecret) . '">' . "\n";
if (!empty($conf->use_javascript_ajax)) {
print '</td><td class="width25">' . img_picto($langs->trans('Generate'), 'refresh', 'id="generate_web_hooks_secret" class="linkobject"');
print "\n" . '<script type="text/javascript">';
Expand All @@ -479,7 +480,8 @@ function(token) {
print '<td>' . $langs->trans("ECommerceSiteWebHooksVolumetryAlert") . '</td>' . "\n";
print '<td>' . $langs->transnoentities("ECommerceSiteWebHooksVolumetryAlertDescription") . '</td>' . "\n";
print '<td class="right">' . "\n";
print '<input type="number" class="flat centpercent" name="site_web_hooks_volumetry_alert" value="' . dol_escape_htmltag($object->parameters['web_hooks_volumetry_alert']) . '">' . "\n";
$p_webhookvolalert = !empty($object->parameters['web_hooks_volumetry_alert']) ? $object->parameters['web_hooks_volumetry_alert'] : '';
print '<input type="number" class="flat centpercent" name="site_web_hooks_volumetry_alert" value="' . dol_escape_htmltag($p_webhookvolalert) . '">' . "\n";
print '</td></tr>' . "\n";

print '</table>' . "\n";
Expand Down
9 changes: 6 additions & 3 deletions admin/stock.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,16 @@
print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
print "</tr>\n";

if ($object->parameters['enable_warehouse_plugin_support'] != 'wmlim') {
$p_warehouseplugin = !empty($object->parameters['enable_warehouse_plugin_support']) ? $object->parameters['enable_warehouse_plugin_support'] : '';
if ($p_warehouseplugin != 'wmlim') {
if (!empty($object->parameters['order_actions']['create_order'])) {
// Warehouse used when valid a order
print '<tr class="oddeven">' . "\n";
print '<td>' . $langs->trans("ECommerceValidOrderWarehouse") . '</td>' . "\n";
print '<td>' . $langs->transnoentities("ECommerceValidOrderWarehouseDescription") . '</td>' . "\n";
print '<td class="right">' . "\n";
print $formproduct->selectWarehouses($object->parameters['order_actions']['valid_order_fk_warehouse'], 'valid_order_fk_warehouse', 0, 1);
$p_orderactionsorder = !empty($object->parameters['order_actions']['valid_order_fk_warehouse']) ? $object->parameters['order_actions']['valid_order_fk_warehouse'] : '';
print $formproduct->selectWarehouses($p_orderactionsorder, 'valid_order_fk_warehouse', 0, 1);
print '</td></tr>' . "\n";
}

Expand All @@ -206,7 +208,8 @@
print '<td>' . $langs->trans("ECommerceValidInvoiceWarehouse") . '</td>' . "\n";
print '<td>' . $langs->transnoentities("ECommerceValidInvoiceWarehouseDescription") . '</td>' . "\n";
print '<td class="right">' . "\n";
print $formproduct->selectWarehouses($object->parameters['order_actions']['valid_invoice_fk_warehouse'], 'valid_invoice_fk_warehouse', 0, 1);
$p_orderactionsinvoice = !empty($object->parameters['order_actions']['valid_invoice_fk_warehouse']) ? $object->parameters['order_actions']['valid_invoice_fk_warehouse'] : '';
print $formproduct->selectWarehouses($p_orderactionsinvoice, 'valid_invoice_fk_warehouse', 0, 1);
print '</td></tr>' . "\n";
}

Expand Down

0 comments on commit d0b9296

Please sign in to comment.