// Merge -> 10309

This commit is contained in:
rMalie
2011-11-21 11:05:10 +00:00
parent 3bfd9ad4ca
commit 82c9dead2a
365 changed files with 11185 additions and 1571 deletions
+21 -2
View File
@@ -557,6 +557,11 @@ if (Tools::isSubmit('helpAccess'))
if (Tools::isSubmit('getHookableList'))
{
/* PrestaShop demo mode */
if (_PS_MODE_DEMO_)
die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}');
/* PrestaShop demo mode*/
if (!strlen(Tools::getValue('hooks_list')))
die('{"hasError" : true, "errors" : ["Live Edit : no module on this page"]}');
@@ -589,6 +594,10 @@ if (Tools::isSubmit('getHookableList'))
if (Tools::isSubmit('getHookableModuleList'))
{
/* PrestaShop demo mode */
if (_PS_MODE_DEMO_)
die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}');
/* PrestaShop demo mode*/
include('../init.php');
$hook_name = Tools::getValue('hook');
@@ -609,6 +618,11 @@ if (Tools::isSubmit('getHookableModuleList'))
if (Tools::isSubmit('saveHook'))
{
/* PrestaShop demo mode */
if (_PS_MODE_DEMO_)
die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}');
/* PrestaShop demo mode*/
$hooks_list = explode(',', Tools::getValue('hooks_list'));
$id_shop = (int)Tools::getValue('id_shop');
if ($id_shop)
@@ -627,10 +641,15 @@ if (Tools::isSubmit('saveHook'))
$hookedModules = explode(',', Tools::getValue($hook));
$i = 1;
$value = '';
$ids = array();
foreach ($hookedModules as $module)
{
$ids = explode('_', $module);
$value .= '('.(int)$ids[1].', '.$id_shop.', (SELECT id_hook FROM '._DB_PREFIX_.'hook WHERE `name` = \''.pSQL($hook).'\' LIMIT 1), '.(int)$i.'),';
$id = explode('_', $module);
if (!in_array($id[1], $ids))
{
$ids[] = $id[1];
$value .= '('.(int)$id[1].', (SELECT id_hook FROM `'._DB_PREFIX_.'hook` WHERE `name` = \''.pSQL($hook).'\' LIMIT 0, 1), '.(int)$i.'),';
}
$i++;
}
$value = rtrim($value, ',');
+3 -3
View File
@@ -84,8 +84,8 @@
$error = TXT_UNKNOWN_REQUEST;
}
echo "{";
echo "error:'" . $error . "',\n";
echo "path:'" . $path . "'";
echo "error:'" . Tools::safeOutput($error) . "',\n";
echo "path:'" . Tools::safeOutput($path) . "'";
echo "}";
?>
?>
+1 -1
View File
@@ -96,4 +96,4 @@ if ($context->cookie->shopContext)
if (count($split) == 2 && $split[0] == 's')
$shopID = (int)$split[1];
}
$context->shop = new Shop($shopID);
$context->shop = new Shop($shopID);
+1 -1
View File
@@ -433,7 +433,7 @@ class AdminUpgrade extends AdminPreferences
else
{
$this->next = 'download';
$this->nextDesc = $this->l('Shop desactivated. Now downloading (this can takes some times )...');
$this->nextDesc = $this->l('Shop deactivated. Now downloading (this can takes some times )...');
}
}