// Replace public by protected in override methods

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13022 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-02-06 13:41:51 +00:00
parent a239000042
commit 96c8e763b9
12 changed files with 18 additions and 18 deletions
@@ -589,12 +589,12 @@ class AdminCarriersControllerCore extends AdminController
$this->fields_value['groupBox_'.$group['id_group']] = Tools::getValue('groupBox_'.$group['id_group'], (in_array($group['id_group'], $carrier_groups_ids) || empty($carrier_groups_ids) && !$obj->id)); $this->fields_value['groupBox_'.$group['id_group']] = Tools::getValue('groupBox_'.$group['id_group'], (in_array($group['id_group'], $carrier_groups_ids) || empty($carrier_groups_ids) && !$obj->id));
} }
public function beforeDelete($object) protected function beforeDelete($object)
{ {
return $object->isUsed(); return $object->isUsed();
} }
public function afterDelete($object, $old_id) protected function afterDelete($object, $old_id)
{ {
$object->copyCarrierData((int)$old_id); $object->copyCarrierData((int)$old_id);
} }
@@ -72,7 +72,7 @@ class AdminCartRulesControllerCore extends AdminController
return parent::postProcess(); return parent::postProcess();
} }
public function afterUpdate($current_object) protected function afterUpdate($current_object)
{ {
// All the associations are deleted for an update, then recreated when we call the "afterAdd" method // All the associations are deleted for an update, then recreated when we call the "afterAdd" method
$id_cart_rule = Tools::getValue('id_cart_rule'); $id_cart_rule = Tools::getValue('id_cart_rule');
@@ -86,7 +86,7 @@ class AdminCartRulesControllerCore extends AdminController
} }
/* @TODO Move this function into CartRule */ /* @TODO Move this function into CartRule */
public function afterAdd($currentObject) protected function afterAdd($currentObject)
{ {
// Add restrictions for generic entities like country, carrier and group // Add restrictions for generic entities like country, carrier and group
foreach (array('country', 'carrier', 'group') as $type) foreach (array('country', 'carrier', 'group') as $type)
@@ -771,7 +771,7 @@ class AdminCustomersControllerCore extends AdminController
return parent::processSave($token); return parent::processSave($token);
} }
public function afterDelete($object, $old_id) protected function afterDelete($object, $old_id)
{ {
$customer = new Customer($old_id); $customer = new Customer($old_id);
$addresses = $customer->getAddresses($this->default_form_language); $addresses = $customer->getAddresses($this->default_form_language);
@@ -272,7 +272,7 @@ class AdminGroupShopControllerCore extends AdminController
return parent::postProcess(); return parent::postProcess();
} }
public function afterAdd($new_group_shop) protected function afterAdd($new_group_shop)
{ {
if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data)) if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data))
$new_group_shop->copyGroupShopData(Tools::getValue('importFromShop'), $import_data); $new_group_shop->copyGroupShopData(Tools::getValue('importFromShop'), $import_data);
@@ -281,7 +281,7 @@ class AdminGroupShopControllerCore extends AdminController
StockAvailable::resetProductFromStockAvailableByGroupShop($new_group_shop); StockAvailable::resetProductFromStockAvailableByGroupShop($new_group_shop);
} }
public function afterUpdate($new_group_shop) protected function afterUpdate($new_group_shop)
{ {
if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data)) if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data))
$new_group_shop->copyGroupShopData(Tools::getValue('importFromShop'), $import_data); $new_group_shop->copyGroupShopData(Tools::getValue('importFromShop'), $import_data);
@@ -674,7 +674,7 @@ class AdminManufacturersControllerCore extends AdminController
parent::initProcess(); parent::initProcess();
} }
public function afterImageUpload() protected function afterImageUpload()
{ {
/* Generate image with differents size */ /* Generate image with differents size */
if (($id_manufacturer = (int)Tools::getValue('id_manufacturer')) && if (($id_manufacturer = (int)Tools::getValue('id_manufacturer')) &&
@@ -508,7 +508,7 @@ class AdminProductsControllerCore extends AdminController
$this->errors[] = Tools::displayError('Could not find image.'); $this->errors[] = Tools::displayError('Could not find image.');
} }
public function processBulkDelete($token) protected function processBulkDelete($token)
{ {
if (is_array($this->boxes) && !empty($this->boxes)) if (is_array($this->boxes) && !empty($this->boxes))
{ {
+1 -1
View File
@@ -64,7 +64,7 @@ class AdminScenesControllerCore extends AdminController
parent::__construct(); parent::__construct();
} }
public function afterImageUpload() protected function afterImageUpload()
{ {
/* Generate image with differents size */ /* Generate image with differents size */
if (!($obj = $this->loadObject(true))) if (!($obj = $this->loadObject(true)))
+2 -2
View File
@@ -217,14 +217,14 @@ class AdminShopControllerCore extends AdminController
return false; return false;
} }
public function afterAdd($new_shop) protected function afterAdd($new_shop)
{ {
if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data)) if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data))
$new_shop->copyShopData((int)Tools::getValue('importFromShop'), $import_data); $new_shop->copyShopData((int)Tools::getValue('importFromShop'), $import_data);
return parent::afterAdd($new_shop); return parent::afterAdd($new_shop);
} }
public function afterUpdate($new_shop) protected function afterUpdate($new_shop)
{ {
Category::updateFromShop(Tools::getValue('categoryBox'), $new_shop->id); Category::updateFromShop(Tools::getValue('categoryBox'), $new_shop->id);
if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data)) if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data))
@@ -309,7 +309,7 @@ class AdminSuppliersControllerCore extends AdminController
return parent::renderView(); return parent::renderView();
} }
public function afterImageUpload() protected function afterImageUpload()
{ {
$return = true; $return = true;
/* Generate image with differents size */ /* Generate image with differents size */
@@ -407,7 +407,7 @@ class AdminSuppliersControllerCore extends AdminController
/** /**
* @see AdminController::afterAdd() * @see AdminController::afterAdd()
*/ */
public function afterAdd($object) protected function afterAdd($object)
{ {
$address = new Address($object->id_address); $address = new Address($object->id_address);
if (Validate::isLoadedObject($address)) if (Validate::isLoadedObject($address))
@@ -422,7 +422,7 @@ class AdminSuppliersControllerCore extends AdminController
/** /**
* @see AdminController::afterUpdate() * @see AdminController::afterUpdate()
*/ */
public function afterUpdate($object) protected function afterUpdate($object)
{ {
$address = new Address($object->id_address); $address = new Address($object->id_address);
if (Validate::isLoadedObject($address)) if (Validate::isLoadedObject($address))
@@ -1944,7 +1944,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
* @param ObjectModel $object * @param ObjectModel $object
* @return bool * @return bool
*/ */
public function afterAdd($object) protected function afterAdd($object)
{ {
$this->object = $object; $this->object = $object;
return true; return true;
+1 -1
View File
@@ -281,7 +281,7 @@ class AdminTabsControllerCore extends AdminController
parent::getList($id_lang, 'position', $order_way, $start, $limit, $id_lang_shop); parent::getList($id_lang, 'position', $order_way, $start, $limit, $id_lang_shop);
} }
public function afterImageUpload() protected function afterImageUpload()
{ {
if (!($obj = $this->loadObject(true))) if (!($obj = $this->loadObject(true)))
return; return;
@@ -513,7 +513,7 @@ class AdminWarehousesControllerCore extends AdminController
/** /**
* @see AdminController::afterAdd() * @see AdminController::afterAdd()
*/ */
public function afterAdd($object) protected function afterAdd($object)
{ {
$address = new Address($object->id_address); $address = new Address($object->id_address);
if (Validate::isLoadedObject($address)) if (Validate::isLoadedObject($address))