// Blocklayered Fix bug with SSL

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12926 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-02-02 10:48:48 +00:00
parent cca93f2c6d
commit 9136bc5ddb
4 changed files with 26 additions and 15 deletions
@@ -1,13 +1,11 @@
<?php
include(dirname(__FILE__).'/../../config/config.inc.php');
include(dirname(__FILE__).'/../../init.php');
include(dirname(__FILE__).'/blocklayered.php');
if (substr(Tools::encrypt('blocklayered/index'),0,10) != Tools::getValue('token') || !Module::isInstalled('blocklayered'))
die('Bad token');
if (!Tools::getValue('ajax'))
{
// Case of nothing to do but showing a message (1)
@@ -17,10 +15,15 @@ if (!Tools::getValue('ajax'))
die();
}
if (Tools::usingSecureMode())
$domain = Tools::getShopDomainSsl(true);
else
$domain = Tools::getShopDomain(true);
// Return a content without waiting the end of index execution
header('Location: '.Tools::getProtocol().Tools::getHttpHost().__PS_BASE_URI__.'modules/blocklayered/blocklayered-price-indexer.php?token='.Tools::getValue('token') .'&return_message='.(int)Tools::getValue('cursor'));
header('Location: '.$domain.__PS_BASE_URI__.'modules/blocklayered/blocklayered-price-indexer.php?token='.Tools::getValue('token') .'&return_message='.(int)Tools::getValue('cursor'));
flush();
}
if(Tools::getValue('full'))
{
echo BlockLayered::fullPricesIndexProcess((int)Tools::getValue('cursor'), (int)Tools::getValue('ajax'), true);