[-] BO : fixed bug #PSCFV-3806 - fixed bug when unchecked all shop asso you can't access to item any more.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17098 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
53937e3cd0
commit
cf51d8372e
1 file changed
+3
-4
@@ -2011,16 +2011,15 @@ class AdminControllerCore extends Controller
|
|||||||
|
|
||||||
if ($this->multishop_context && Shop::isTableAssociated($this->table) && !empty($this->className))
|
if ($this->multishop_context && Shop::isTableAssociated($this->table) && !empty($this->className))
|
||||||
{
|
{
|
||||||
if (Shop::getContext() != Shop::CONTEXT_ALL || Shop::isTableAssociated($this->table) || !$this->context->employee->isSuperAdmin())
|
if (Shop::getContext() != Shop::CONTEXT_ALL || !$this->context->employee->isSuperAdmin())
|
||||||
{
|
{
|
||||||
$identifier_shop = Shop::getContextListShopID();
|
|
||||||
$test_join = !preg_match('#`?'.preg_quote(_DB_PREFIX_.$this->table.'_shop').'`? *sa#', $this->_join);
|
$test_join = !preg_match('#`?'.preg_quote(_DB_PREFIX_.$this->table.'_shop').'`? *sa#', $this->_join);
|
||||||
if (Shop::isFeatureActive() && $test_join)
|
if (Shop::isFeatureActive() && $test_join && Shop::isTableAssociated($this->table))
|
||||||
{
|
{
|
||||||
$this->_where .= ' AND a.'.$this->identifier.' IN (
|
$this->_where .= ' AND a.'.$this->identifier.' IN (
|
||||||
SELECT sa.'.$this->identifier.'
|
SELECT sa.'.$this->identifier.'
|
||||||
FROM `'._DB_PREFIX_.$this->table.'_shop` sa
|
FROM `'._DB_PREFIX_.$this->table.'_shop` sa
|
||||||
WHERE sa.id_shop IN ('.implode(', ', $identifier_shop).')
|
WHERE sa.id_shop IN ('.implode(', ', Shop::getContextListShopID()).')
|
||||||
)';
|
)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user