From 17579de481123d15ad41fba166445222c5b150df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Thu, 27 Jun 2013 15:41:37 +0200 Subject: [PATCH] [-] FO: Fix #PSCFV-9325 all was included on 301 for root deprecated controllers --- address.php | 2 +- addresses.php | 2 +- attachment.php | 2 +- authentication.php | 2 +- best-sales.php | 2 +- category.php | 2 +- changecurrency.php | 2 +- classes/shop/ShopGroup.php | 13 ++++++++++++- cms.php | 2 +- contact-form.php | 2 +- controllers/admin/AdminShopController.php | 9 ++------- discount.php | 2 +- get-file.php | 2 +- history.php | 2 +- identity.php | 2 +- manufacturer.php | 2 +- my-account.php | 2 +- new-products.php | 2 +- order-confirmation.php | 2 +- order-detail.php | 2 +- order-follow.php | 2 +- order-opc.php | 2 +- order-return.php | 2 +- order-slip.php | 2 +- order.php | 2 +- password.php | 2 +- pdf-invoice.php | 2 +- pdf-order-return.php | 2 +- pdf-order-slip.php | 2 +- prices-drop.php | 2 +- product-sort.php | 2 +- product.php | 2 +- products-comparison.php | 2 +- search.php | 2 +- sitemap.php | 2 +- statistics.php | 2 +- stores.php | 2 +- supplier.php | 2 +- 38 files changed, 50 insertions(+), 44 deletions(-) diff --git a/address.php b/address.php index fcfac54af..4dbf1d223 100644 --- a/address.php +++ b/address.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=address'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=address'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/addresses.php b/addresses.php index 75e3a1dfe..cda46efcf 100644 --- a/addresses.php +++ b/addresses.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=addresses'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=addresses'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/attachment.php b/attachment.php index bca6b7515..b279b5a60 100644 --- a/attachment.php +++ b/attachment.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=attachment'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=attachment'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/authentication.php b/authentication.php index 109e775ea..71afb055d 100644 --- a/authentication.php +++ b/authentication.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=authentication'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=authentication'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/best-sales.php b/best-sales.php index 2a6a11a92..0de3b406a 100644 --- a/best-sales.php +++ b/best-sales.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=best-sales'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=best-sales'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/category.php b/category.php index 9c6033f7b..a4113606e 100644 --- a/category.php +++ b/category.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=category'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=category'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/changecurrency.php b/changecurrency.php index 8b917441c..fe8e4a65d 100644 --- a/changecurrency.php +++ b/changecurrency.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=change-currency'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=change-currency'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/classes/shop/ShopGroup.php b/classes/shop/ShopGroup.php index 288463918..7818fb56f 100644 --- a/classes/shop/ShopGroup.php +++ b/classes/shop/ShopGroup.php @@ -153,4 +153,15 @@ class ShopGroupCore extends ObjectModel return false; } -} + + public function shopNameExists($name, $id_shop = false) + { + return Db::getInstance()->getValue(' + SELECT id_shop + FROM '._DB_PREFIX_.'shop + WHERE name = "'.pSQL($name).'" + AND id_shop_group = '.(int)$this->id.' + '.($id_shop ? 'AND id_shop != '.(int)$id_shop : '') + ); + } +} \ No newline at end of file diff --git a/cms.php b/cms.php index 5eef078cc..ff2c40d7c 100644 --- a/cms.php +++ b/cms.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=cms'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=cms'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/contact-form.php b/contact-form.php index ceef9234d..5891e5b0a 100644 --- a/contact-form.php +++ b/contact-form.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=contact'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=contact'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php index 285459ea2..74f74010d 100755 --- a/controllers/admin/AdminShopController.php +++ b/controllers/admin/AdminShopController.php @@ -226,13 +226,8 @@ class AdminShopControllerCore extends AdminController if (Tools::isSubmit('submitAddshopAndStay') || Tools::isSubmit('submitAddshop')) { - $same_name = Db::getInstance()->getValue(' - SELECT id_shop - FROM '._DB_PREFIX_.'shop - WHERE name = "'.pSQL(Tools::getValue('name')).'" - AND id_shop_group = '.(int)Tools::getValue('id_shop_group').' - '.(Tools::getValue('id_shop') ? 'AND id_shop != '.(int)Tools::getValue('id_shop') : '')); - if ($same_name) + $shop_group = new ShopGroup((int)Tools::getValue('id_shop_group')); + if ($shop_group->shopNameExists(Tools::getValue('name'), (int)Tools::getValue('id_shop'))) $this->errors[] = Tools::displayError('You cannot have two shops with the same name in the same group.'); } diff --git a/discount.php b/discount.php index b01f1e5fa..173f8d5a5 100644 --- a/discount.php +++ b/discount.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=discount'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=discount'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/get-file.php b/get-file.php index b283dfce5..70507df4a 100644 --- a/get-file.php +++ b/get-file.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=get-file'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=get-file'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/history.php b/history.php index 8009c4980..e4a97510b 100644 --- a/history.php +++ b/history.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=history'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=history'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/identity.php b/identity.php index 1a4ca7613..845738311 100644 --- a/identity.php +++ b/identity.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=identity'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=identity'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/manufacturer.php b/manufacturer.php index 2b781f0a4..92715f48d 100644 --- a/manufacturer.php +++ b/manufacturer.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=manufacturer'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=manufacturer'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/my-account.php b/my-account.php index eaaa21c4e..9569dfa8f 100644 --- a/my-account.php +++ b/my-account.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=my-account'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=my-account'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/new-products.php b/new-products.php index 31affef69..49d26cdbf 100644 --- a/new-products.php +++ b/new-products.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=new-products'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=new-products'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-confirmation.php b/order-confirmation.php index bc9c89f33..eeef146d8 100644 --- a/order-confirmation.php +++ b/order-confirmation.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=order-confirmation'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=order-confirmation'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-detail.php b/order-detail.php index d73416ab5..7ef3b3d24 100644 --- a/order-detail.php +++ b/order-detail.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=order-detail'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=order-detail'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-follow.php b/order-follow.php index 95d0d5640..9cc7e6e45 100644 --- a/order-follow.php +++ b/order-follow.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=order-follow'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=order-follow'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-opc.php b/order-opc.php index dd96c9e86..1f7ae4f84 100644 --- a/order-opc.php +++ b/order-opc.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=order-opc'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=order-opc'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-return.php b/order-return.php index 15d8970ae..07e8afcaa 100644 --- a/order-return.php +++ b/order-return.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=order-return'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=order-return'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-slip.php b/order-slip.php index 441f8ac42..b43f6b0cb 100644 --- a/order-slip.php +++ b/order-slip.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=order-slip'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=order-slip'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order.php b/order.php index ce8ef1dbf..bfcd72554 100644 --- a/order.php +++ b/order.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=order'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=order'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/password.php b/password.php index c75289451..bd8bbf774 100644 --- a/password.php +++ b/password.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=password'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=password'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/pdf-invoice.php b/pdf-invoice.php index ad215af5d..485d8fdfe 100644 --- a/pdf-invoice.php +++ b/pdf-invoice.php @@ -34,4 +34,4 @@ include(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=pdf-invoice'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=pdf-invoice'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/pdf-order-return.php b/pdf-order-return.php index def91fe9a..209bc5251 100644 --- a/pdf-order-return.php +++ b/pdf-order-return.php @@ -34,4 +34,4 @@ include(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=pdf-order-return'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=pdf-order-return'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/pdf-order-slip.php b/pdf-order-slip.php index 538800896..c466ed015 100644 --- a/pdf-order-slip.php +++ b/pdf-order-slip.php @@ -34,4 +34,4 @@ include(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=pdf-order-slip'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=pdf-order-slip'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/prices-drop.php b/prices-drop.php index 0117a52a4..0fda5fdb7 100644 --- a/prices-drop.php +++ b/prices-drop.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=prices-drop'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=prices-drop'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/product-sort.php b/product-sort.php index ec4edd0da..c472c2474 100644 --- a/product-sort.php +++ b/product-sort.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=product-sort'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=product-sort'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/product.php b/product.php index be7f995ae..141b69045 100644 --- a/product.php +++ b/product.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=product'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=product'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/products-comparison.php b/products-comparison.php index 4de691d20..392451103 100644 --- a/products-comparison.php +++ b/products-comparison.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=products-comparison'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=products-comparison'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/search.php b/search.php index 9fd0546e9..765f22017 100644 --- a/search.php +++ b/search.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=search'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=search'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/sitemap.php b/sitemap.php index b7f90fc1d..32fc34936 100644 --- a/sitemap.php +++ b/sitemap.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=sitemap'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=sitemap'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/statistics.php b/statistics.php index 6ef58a59e..f1837c308 100644 --- a/statistics.php +++ b/statistics.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=statistics'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=statistics'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/stores.php b/stores.php index 7991ad967..48d74257a 100644 --- a/stores.php +++ b/stores.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=stores'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=stores'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/supplier.php b/supplier.php index 33c5d5611..dea782448 100644 --- a/supplier.php +++ b/supplier.php @@ -34,4 +34,4 @@ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); -Tools::redirect('index.php?controller=supplier'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file +Tools::redirect('index.php?controller=supplier'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file