// Fix group shop filter association in getList() and improve assoshop with Group: text

This commit is contained in:
rMalie
2012-02-17 10:06:00 +00:00
parent 0b6fcecdc3
commit bba39755fc
3 changed files with 187 additions and 186 deletions
+9 -9
View File
@@ -1934,18 +1934,18 @@ class AdminControllerCore extends Controller
$where_shop = $this->context->shop->addSqlRestriction($this->shopShareDatas, 'a', $this->shopLinkType);
}
$assos = Shop::getAssoTables();
if (isset($assos[$this->table]) && $assos[$this->table]['type'] == 'shop')
if ($this->display_multishop_toolbar)
{
$filter_key = $assos[$this->table]['type'];
$idenfier_shop = $this->context->shop->getListOfID();
}
else if (Context::shop() == Shop::CONTEXT_GROUP)
{
$assos = GroupShop::getAssoTables();
if (isset($assos[$this->table]) && $assos[$this->table]['type'] == 'group_shop')
$assos = Shop::getAssoTables();
$assos_group = GroupShop::getAssoTables();
if (isset($assos[$this->table]) && $assos[$this->table]['type'] == 'shop')
{
$filter_key = $assos[$this->table]['type'];
$idenfier_shop = $this->context->shop->getListOfID();
}
else if (isset($assos_group[$this->table]) && $assos_group[$this->table]['type'] == 'group_shop')
{
$filter_key = $assos_group[$this->table]['type'];
$idenfier_shop = array($this->context->shop->getGroupID());
}
}