From dd0bf15420daba992b2fab77dcfe0318c7143852 Mon Sep 17 00:00:00 2001 From: rMalie Date: Sat, 19 May 2012 14:02:59 +0000 Subject: [PATCH] // Remove AdminProductsController->cleanMultishopFields --- controllers/admin/AdminProductsController.php | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 9490a37ba..b8bb3ceb2 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -1783,26 +1783,6 @@ class AdminProductsControllerCore extends AdminController return !empty($_POST['multishop_check'][$field][$id_lang]); } - /** - * If multishop is activated and context is all / group, set to empty all fields values not checked - */ - protected function cleanMultishopFields() - { - if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP && $this->id_object) - { - $this->object = $this->loadObject(); - foreach (Product::$definition['fields'] as $field => $data) - if (!empty($data['shop']) || !empty($data['lang'])) - { - if (is_array($this->object->$field)) - foreach ($this->object->$field as $k => $v) - $this->object->{$field}[$k] = ''; - else - $this->object->$field = ''; - } - } - } - protected function _removeTaxFromEcotax() { $ecotaxTaxRate = Tax::getProductEcotaxRate(); @@ -2206,7 +2186,6 @@ class AdminProductsControllerCore extends AdminController // This nice code (irony) is here to store the product name, because the row after will erase product name in multishop context $this->product_name = $this->object->name[$this->context->language->id]; - $this->cleanMultishopFields(); if (!method_exists($this, 'initForm'.$this->tab_display)) return;