diff --git a/classes/AdminTab.php b/classes/AdminTab.php
index 97467207d..6375b5f12 100644
--- a/classes/AdminTab.php
+++ b/classes/AdminTab.php
@@ -1676,9 +1676,9 @@ abstract class AdminTabCore
elseif (isset($params['float']))
echo rtrim(rtrim($tr[$key], '0'), '.');
elseif (isset($params['type']) && $params['type'] == 'date')
- echo Tools::displayDate($tr[$key], $this->context->language->id);
+ echo Tools::displayDate($tr[$key]);
elseif (isset($params['type']) && $params['type'] == 'datetime')
- echo Tools::displayDate($tr[$key], $this->context->language->id, true);
+ echo Tools::displayDate($tr[$key],null , true);
elseif (isset($tr[$key]))
{
if ($key == 'price')
diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php
index e19f2947b..561881c55 100644
--- a/classes/PaymentModule.php
+++ b/classes/PaymentModule.php
@@ -595,7 +595,7 @@ abstract class PaymentModuleCore extends Module
'{invoice_phone}' => ($invoice->phone) ? $invoice->phone : $invoice->phone_mobile,
'{invoice_other}' => $invoice->other,
'{order_name}' => $order->getUniqReference(),
- '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)$order->id_lang, 1),
+ '{date}' => Tools::displayDate(date('Y-m-d H:i:s'),null , 1),
'{carrier}' => $virtual_product ? Tools::displayError('No carrier') : $carrier->name,
'{payment}' => Tools::substr($order->payment, 0, 32),
'{products}' => $this->formatProductAndVoucherForEmail($products_list),
diff --git a/classes/Tools.php b/classes/Tools.php
index 02e8e9d23..34c1229db 100644
--- a/classes/Tools.php
+++ b/classes/Tools.php
@@ -598,7 +598,7 @@ class ToolsCore
*/
public static function dateFormat($params, &$smarty)
{
- return Tools::displayDate($params['date'], Context::getContext()->language->id, (isset($params['full']) ? $params['full'] : false));
+ return Tools::displayDate($params['date'], null, (isset($params['full']) ? $params['full'] : false));
}
/**
@@ -1852,7 +1852,7 @@ exit;
{
$backtrace = debug_backtrace();
$callee = next($backtrace);
- $error = 'Parameter '.$parameter.' in function '.$callee['function'].'() is deprecated in '.$callee['file'].' on line '.$callee['Line'].'
';
+ $error = 'Parameter '.$parameter.' in function '.(isset($callee['function']) ? $callee['function'] : '').'() is deprecated in '.$callee['file'].' on line '.$callee['Line'].'
';
$message = 'The parameter '.$parameter.' in function '.$callee['function'].' (Line '.$callee['Line'].') is deprecated and will be removed in the next major version.';
$class = isset($callee['class']) ? $callee['class'] : null;
diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php
index 34db27bdf..eeff1eea4 100644
--- a/classes/helper/HelperList.php
+++ b/classes/helper/HelperList.php
@@ -282,9 +282,9 @@ class HelperListCore extends Helper
$this->_list[$index][$key] = Tools::displayPrice($tr[$key], $currency, false);
}
elseif (isset($params['type']) && $params['type'] == 'date')
- $this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id);
+ $this->_list[$index][$key] = Tools::displayDate($tr[$key]);
elseif (isset($params['type']) && $params['type'] == 'datetime')
- $this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id, true);
+ $this->_list[$index][$key] = Tools::displayDate($tr[$key],null , true);
elseif (isset($tr[$key]))
{
$echo = $tr[$key];
diff --git a/classes/order/OrderHistory.php b/classes/order/OrderHistory.php
index 853d15450..895280fb5 100644
--- a/classes/order/OrderHistory.php
+++ b/classes/order/OrderHistory.php
@@ -123,7 +123,7 @@ class OrderHistoryCore extends ObjectModel
.'&secure_key='.$order->secure_key;
$assign[$key]['link'] = $dl_link;
if (isset($virtual_product['date_expiration']) && $virtual_product['date_expiration'] != '0000-00-00 00:00:00')
- $assign[$key]['deadline'] = Tools::displayDate($virtual_product['date_expiration '], $order->id_lang);
+ $assign[$key]['deadline'] = Tools::displayDate($virtual_product['date_expiration ']);
if ($product_download->nb_downloadable != 0)
$assign[$key]['downloadable'] = (int)$product_download->nb_downloadable;
}
diff --git a/classes/pdf/HTMLTemplateDeliverySlip.php b/classes/pdf/HTMLTemplateDeliverySlip.php
index a18a4e3b5..6ca63012f 100755
--- a/classes/pdf/HTMLTemplateDeliverySlip.php
+++ b/classes/pdf/HTMLTemplateDeliverySlip.php
@@ -38,7 +38,7 @@ class HTMLTemplateDeliverySlipCore extends HTMLTemplate
$this->smarty = $smarty;
// header informations
- $this->date = Tools::displayDate($this->order->invoice_date, (int)$this->order->id_lang);
+ $this->date = Tools::displayDate($this->order->invoice_date);
$this->title = HTMLTemplateDeliverySlip::l('Delivery').' #'.Configuration::get('PS_DELIVERY_PREFIX', Context::getContext()->language->id).sprintf('%06d', $this->order_invoice->delivery_number);
// footer informations
diff --git a/classes/pdf/HTMLTemplateInvoice.php b/classes/pdf/HTMLTemplateInvoice.php
index 52600802f..86c475833 100755
--- a/classes/pdf/HTMLTemplateInvoice.php
+++ b/classes/pdf/HTMLTemplateInvoice.php
@@ -39,7 +39,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
$this->smarty = $smarty;
// header informations
- $this->date = Tools::displayDate($order_invoice->date_add, (int)$this->order->id_lang);
+ $this->date = Tools::displayDate($order_invoice->date_add);
$id_lang = Context::getContext()->language->id;
$this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int)$this->order->id_shop).sprintf('%06d', $order_invoice->number);
diff --git a/classes/pdf/HTMLTemplateOrderReturn.php b/classes/pdf/HTMLTemplateOrderReturn.php
index 0e366ce91..4bee5be8c 100755
--- a/classes/pdf/HTMLTemplateOrderReturn.php
+++ b/classes/pdf/HTMLTemplateOrderReturn.php
@@ -39,7 +39,7 @@ class HTMLTemplateOrderReturnCore extends HTMLTemplate
$this->order = new Order($order_return->id_order);
// header informations
- $this->date = Tools::displayDate($this->order->invoice_date, (int)$this->order->id_lang);
+ $this->date = Tools::displayDate($this->order->invoice_date);
$this->title = HTMLTemplateOrderReturn::l('Order Return ').sprintf('%06d', $this->order_return->id);
// footer informations
diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php
index d97b0fded..cc6ed3882 100644
--- a/controllers/admin/AdminCustomerThreadsController.php
+++ b/controllers/admin/AdminCustomerThreadsController.php
@@ -557,7 +557,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
$products = $customer->getBoughtProducts();
if ($products && count($products))
foreach ($products as $key => $product)
- $products[$key]['date_add'] = Tools::displayDate($product['date_add'], $this->context->language->id, true);
+ $products[$key]['date_add'] = Tools::displayDate($product['date_add'],null , true);
}
foreach ($messages as $key => $message)
@@ -595,7 +595,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
if (!empty($message['id_product']) && empty($message['employee_name']))
$id_order_product = Order::getIdOrderProduct((int)$message['id_customer'], (int)$message['id_product']);
}
- $message['date_add'] = Tools::displayDate($message['date_add'], $this->context->language->id, true);
+ $message['date_add'] = Tools::displayDate($message['date_add'],null , true);
$message['user_agent'] = strip_tags($message['user_agent']);
$message['message'] = preg_replace(
'/(https?:\/\/[a-z0-9#%&_=\(\)\.\? \+\-@\/]{6,1000})([\s\n<])/Uui',
diff --git a/controllers/admin/AdminCustomersController.php b/controllers/admin/AdminCustomersController.php
index e395e725d..67295f8f2 100644
--- a/controllers/admin/AdminCustomersController.php
+++ b/controllers/admin/AdminCustomersController.php
@@ -555,7 +555,7 @@ class AdminCustomersControllerCore extends AdminController
$total_orders = count($orders);
for ($i = 0; $i < $total_orders; $i++)
{
- $orders[$i]['date_add'] = Tools::displayDate($orders[$i]['date_add'], $this->context->language->id);
+ $orders[$i]['date_add'] = Tools::displayDate($orders[$i]['date_add']);
$orders[$i]['total_paid_real_not_formated'] = $orders[$i]['total_paid_real'];
$orders[$i]['total_paid_real'] = Tools::displayPrice($orders[$i]['total_paid_real'], new Currency((int)$orders[$i]['id_currency']));
}
@@ -565,7 +565,7 @@ class AdminCustomersControllerCore extends AdminController
for ($i = 0; $i < $total_messages; $i++)
{
$messages[$i]['message'] = substr(strip_tags(html_entity_decode($messages[$i]['message'], ENT_NOQUOTES, 'UTF-8')), 0, 75);
- $messages[$i]['date_add'] = Tools::displayDate($messages[$i]['date_add'], $this->context->language->id, true);
+ $messages[$i]['date_add'] = Tools::displayDate($messages[$i]['date_add'], null, true);
}
$groups = $customer->getGroups();
@@ -598,7 +598,7 @@ class AdminCustomersControllerCore extends AdminController
$products = $customer->getBoughtProducts();
$total_products = count($products);
for ($i = 0; $i < $total_products; $i++)
- $products[$i]['date_add'] = Tools::displayDate($products[$i]['date_add'], $this->default_form_language, true);
+ $products[$i]['date_add'] = Tools::displayDate($products[$i]['date_add'], null, true);
$carts = Cart::getCustomerCarts($customer->id);
$total_carts = count($carts);
@@ -610,7 +610,7 @@ class AdminCustomersControllerCore extends AdminController
$currency = new Currency((int)$carts[$i]['id_currency']);
$carrier = new Carrier((int)$carts[$i]['id_carrier']);
$carts[$i]['id_cart'] = sprintf('%06d', $carts[$i]['id_cart']);
- $carts[$i]['date_add'] = Tools::displayDate($carts[$i]['date_add'], $this->default_form_language, true);
+ $carts[$i]['date_add'] = Tools::displayDate($carts[$i]['date_add'], null, true);
$carts[$i]['total_price'] = Tools::displayPrice($summary['total_price'], $currency);
$carts[$i]['name'] = $carrier->name;
}
@@ -646,7 +646,7 @@ class AdminCustomersControllerCore extends AdminController
$total_connections = count($connections);
for ($i = 0; $i < $total_connections; $i++)
{
- $connections[$i]['date_add'] = Tools::displayDate($connections[$i]['date_add'], $this->default_form_language, true);
+ $connections[$i]['date_add'] = Tools::displayDate($connections[$i]['date_add'],null , true);
$connections[$i]['http_referer'] = $connections[$i]['http_referer'] ?
preg_replace('/^www./', '', parse_url($connections[$i]['http_referer'], PHP_URL_HOST)) :
$this->l('Direct link');
@@ -655,7 +655,7 @@ class AdminCustomersControllerCore extends AdminController
$referrers = Referrer::getReferrers($customer->id);
$total_referrers = count($referrers);
for ($i = 0; $i < $total_referrers; $i++)
- $referrers[$i]['date_add'] = Tools::displayDate($referrers[$i]['date_add'], $this->default_form_language, true);
+ $referrers[$i]['date_add'] = Tools::displayDate($referrers[$i]['date_add'],null , true);
$shop = new Shop($customer->id_shop);
$this->tpl_view_vars = array(
@@ -663,14 +663,14 @@ class AdminCustomersControllerCore extends AdminController
'gender_image' => $gender_image,
// General information of the customer
- 'registration_date' => Tools::displayDate($customer->date_add, $this->default_form_language, true),
+ 'registration_date' => Tools::displayDate($customer->date_add,null , true),
'customer_stats' => $customer_stats,
- 'last_visit' => Tools::displayDate($customer_stats['last_visit'], $this->default_form_language, true),
+ 'last_visit' => Tools::displayDate($customer_stats['last_visit'],null , true),
'count_better_customers' => $count_better_customers,
'shop_is_feature_active' => Shop::isFeatureActive(),
'name_shop' => $shop->name,
'customer_birthday' => Tools::displayDate($customer->birthday, $this->default_form_language),
- 'last_update' => Tools::displayDate($customer->date_upd, $this->default_form_language, true),
+ 'last_update' => Tools::displayDate($customer->date_upd,null , true),
'customer_exists' => Customer::customerExists($customer->email),
'id_lang' => $customer->id_lang,
'customerLanguage' => (new Language($customer->id_lang)),
diff --git a/controllers/admin/AdminSupplyOrdersController.php b/controllers/admin/AdminSupplyOrdersController.php
index 7980fb48f..25d98a664 100644
--- a/controllers/admin/AdminSupplyOrdersController.php
+++ b/controllers/admin/AdminSupplyOrdersController.php
@@ -1877,9 +1877,9 @@ class AdminSupplyOrdersControllerCore extends AdminController
'supply_order_warehouse' => (Validate::isLoadedObject($warehouse) ? $warehouse->name : ''),
'supply_order_reference' => $supply_order->reference,
'supply_order_supplier_name' => $supply_order->supplier_name,
- 'supply_order_creation_date' => Tools::displayDate($supply_order->date_add, $lang_id, false),
- 'supply_order_last_update' => Tools::displayDate($supply_order->date_upd, $lang_id, false),
- 'supply_order_expected' => Tools::displayDate($supply_order->date_delivery_expected, $lang_id, false),
+ 'supply_order_creation_date' => Tools::displayDate($supply_order->date_add,null , false),
+ 'supply_order_last_update' => Tools::displayDate($supply_order->date_upd,null , false),
+ 'supply_order_expected' => Tools::displayDate($supply_order->date_delivery_expected,null , false),
'supply_order_discount_rate' => Tools::ps_round($supply_order->discount_rate, 2),
'supply_order_total_te' => Tools::displayPrice($supply_order->total_te, $currency),
'supply_order_discount_value_te' => Tools::displayPrice($supply_order->discount_value_te, $currency),
diff --git a/controllers/front/ContactController.php b/controllers/front/ContactController.php
index 598258a8d..82c2345a9 100644
--- a/controllers/front/ContactController.php
+++ b/controllers/front/ContactController.php
@@ -281,7 +281,7 @@ class ContactControllerCore extends FrontController
$tmp = $order->getProducts();
foreach ($tmp as $key => $val)
$products[$row['id_order']][$val['product_id']] = array('value' => $val['product_id'], 'label' => $val['product_name']);
- $orders[] = array('value' => $order->id, 'label' => $order->getUniqReference().' - '.Tools::displayDate($date[0], $this->context->language->id), 'selected' => (int)Tools::getValue('id_order') == $order->id);
+ $orders[] = array('value' => $order->id, 'label' => $order->getUniqReference().' - '.Tools::displayDate($date[0],null , 'selected' => (int)Tools::getValue('id_order') == $order->id);
}
$this->context->smarty->assign('orderList', $orders);
diff --git a/modules/blocklayered/blocklayered.php b/modules/blocklayered/blocklayered.php
index f88098e3b..04f9fbeb9 100644
--- a/modules/blocklayered/blocklayered.php
+++ b/modules/blocklayered/blocklayered.php
@@ -1757,7 +1757,7 @@ class BlockLayered extends Module
diff --git a/modules/referralprogram/referralprogram.php b/modules/referralprogram/referralprogram.php
index f781630f7..697824fa7 100644
--- a/modules/referralprogram/referralprogram.php
+++ b/modules/referralprogram/referralprogram.php
@@ -580,7 +580,7 @@ class ReferralProgram extends Module
' : '
').'