// Refactoring of shop class with new context

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7604 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-12 16:28:20 +00:00
parent 9f7c369d53
commit 10dd3db8d4
28 changed files with 216 additions and 185 deletions
+3 -3
View File
@@ -1169,7 +1169,7 @@ class AdminProducts extends AdminTab
/* Update an existing product */
if (isset($id) AND !empty($id))
{
$object = new $this->className($id, false, NULL, Shop::getCurrentShop(true));
$object = new $this->className($id);
if (Validate::isLoadedObject($object))
{
$this->_removeTaxFromEcotax();
@@ -1402,7 +1402,7 @@ class AdminProducts extends AdminTab
{
global $currentIndex, $cookie;
$id_shop = Shop::getCurrentShop(true);
$id_shop = Context::getContext()->shop->getID();
if (($id_category = (int)Tools::getValue('id_category')))
$currentIndex .= '&id_category='.$id_category;
@@ -3816,7 +3816,7 @@ class AdminProducts extends AdminTab
if ($id = (int)(Tools::getValue($this->identifier)) AND Validate::isUnsignedId($id))
{
if (!$this->_object)
$this->_object = new $this->className($id, false, NULL, (int)Shop::getCurrentShop(true));
$this->_object = new $this->className($id);
if (Validate::isLoadedObject($this->_object))
return $this->_object;
$this->_errors[] = Tools::displayError('Object cannot be loaded (not found)');