// Context part 15
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7658 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -54,7 +54,7 @@ class AdminInvoices extends AdminTab
|
||||
LIMIT 1
|
||||
) id_order_state
|
||||
FROM '._DB_PREFIX_.'orders o
|
||||
WHERE o.id_shop IN('.implode(', ', Shop::getListFromContext()).')
|
||||
WHERE o.id_shop IN('.implode(', ', $context->shop->getListOfID()).')
|
||||
GROUP BY id_order_state');
|
||||
$statusStats = array();
|
||||
foreach ($result as $row)
|
||||
|
||||
@@ -82,9 +82,9 @@ class AdminModulesPositions extends AdminTab
|
||||
// Adding vars...
|
||||
else
|
||||
{
|
||||
if (!$module->registerHook($hook->name, Shop::getListFromContext()))
|
||||
if (!$module->registerHook($hook->name, Context::getContext()->shop->getListOfID()))
|
||||
$this->_errors[] = Tools::displayError('An error occurred while transplanting module to hook.');
|
||||
elseif (!$module->registerExceptions($id_hook, $excepts, Shop::getListFromContext()))
|
||||
elseif (!$module->registerExceptions($id_hook, $excepts, Context::getContext()->shop->getListOfID()))
|
||||
$this->_errors[] = Tools::displayError('An error occurred while transplanting module to hook.');
|
||||
else
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=16'.($this->displayKey ? '&show_modules='.$this->displayKey : '').'&token='.$this->token);
|
||||
@@ -124,7 +124,7 @@ class AdminModulesPositions extends AdminTab
|
||||
$this->_errors[] = Tools::displayError('No valid value for field exceptions');
|
||||
|
||||
// Add files exceptions
|
||||
if (!$module->editExceptions($id_hook, $exception, Shop::getListFromContext()))
|
||||
if (!$module->editExceptions($id_hook, $exception, Context::getContext()->shop->getListOfID()))
|
||||
$this->_errors[] = Tools::displayError('An error occurred while transplanting module to hook.');
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ class AdminModulesPositions extends AdminTab
|
||||
$this->_errors[] = Tools::displayError('No valid value for field exceptions');
|
||||
|
||||
// Add files exceptions
|
||||
if (!$module->editExceptions($id_hook, $exceptions, Shop::getListFromContext()))
|
||||
if (!$module->editExceptions($id_hook, $exceptions, Context::getContext()->shop->getListOfID()))
|
||||
$this->_errors[] = Tools::displayError('An error occurred while transplanting module to hook.');
|
||||
else
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=16'.($this->displayKey ? '&show_modules='.$this->displayKey : '').'&token='.$this->token);
|
||||
@@ -167,7 +167,7 @@ class AdminModulesPositions extends AdminTab
|
||||
$this->_errors[] = Tools::displayError('Hook cannot be loaded.');
|
||||
else
|
||||
{
|
||||
if (!$module->unregisterHook($id_hook, Shop::getListFromContext()) OR !$module->unregisterExceptions($id_hook, Shop::getListFromContext()))
|
||||
if (!$module->unregisterHook($id_hook, Context::getContext()->shop->getListOfID()) OR !$module->unregisterExceptions($id_hook, Context::getContext()->shop->getListOfID()))
|
||||
$this->_errors[] = Tools::displayError('An error occurred while deleting module from hook.');
|
||||
else
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=17'.($this->displayKey ? '&show_modules='.$this->displayKey : '').'&token='.$this->token);
|
||||
@@ -347,7 +347,7 @@ class AdminModulesPositions extends AdminTab
|
||||
FROM '._DB_PREFIX_.'hook_module
|
||||
WHERE id_module = '.$id_module.'
|
||||
AND id_hook = '.$id_hook.'
|
||||
AND id_shop IN('.implode(', ', ShopCore::getListFromContext()).')';
|
||||
AND id_shop IN('.implode(', ', Context::getContext()->shop->getListOfID()).')';
|
||||
if (!Db::getInstance()->getValue($sql))
|
||||
Tools::redirectAdmin(self::$currentIndex . '&token='.$this->token);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class AdminStockMvt extends AdminTab
|
||||
$context = Context::getContext();
|
||||
|
||||
$this->_select = 'CONCAT(pl.name, \' \', GROUP_CONCAT(IFNULL(al.name, \'\'), \'\')) product_name, CONCAT(e.lastname, \' \', e.firstname) employee, mrl.name reason';
|
||||
$this->_join = 'INNER JOIN '._DB_PREFIX_.'stock stock ON a.id_stock = stock.id_stock '.Shop::sqlSharedStock('stock').'
|
||||
$this->_join = 'INNER JOIN '._DB_PREFIX_.'stock stock ON a.id_stock = stock.id_stock '.$context->shop->sqlSharedStock('stock').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (stock.id_product = pl.id_product AND pl.id_lang = '.(int)$context->language->id.' AND pl.id_shop = '.$context->shop->getID(true).')
|
||||
LEFT JOIN `'._DB_PREFIX_.'stock_mvt_reason_lang` mrl ON (a.id_stock_mvt_reason = mrl.id_stock_mvt_reason AND mrl.id_lang = '.(int)$context->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'employee` e ON (e.id_employee = a.id_employee)
|
||||
|
||||
Reference in New Issue
Block a user