[+] Dispatcher

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7069 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fBrignoli
2011-06-15 16:32:06 +00:00
parent fbe279894a
commit 4a210f98d9
140 changed files with 936 additions and 534 deletions
+2 -1
View File
@@ -54,7 +54,7 @@ class ProductControllerCore extends FrontController
{
if ($id_product = (int)Tools::getValue('id_product'))
$this->product = new Product($id_product, true, self::$cookie->id_lang);
if (!Validate::isLoadedObject($this->product))
{
header('HTTP/1.1 404 Not Found');
@@ -67,6 +67,7 @@ class ProductControllerCore extends FrontController
if (Validate::isLoadedObject($this->product))
{
$canonicalURL = self::$link->getProductLink($this->product);
p($canonicalURL);
if (!preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/', Tools::getProtocol().$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))
{
header('HTTP/1.0 301 Moved');