//Use protected instead of private function

This commit is contained in:
mDeflotte committed 2011-09-29 07:07:06 +00:00
1 parent 5afad63705
commit 675a8fe95b
4 files changed
+11 -11

No files matched your search

+1 -1
View File
@@ -51,7 +51,7 @@ class OrderOpcControllerCore extends ParentOrderController
{ {
$txtMessage = urldecode(Tools::getValue('message')); $txtMessage = urldecode(Tools::getValue('message'));
$this->_updateMessage($txtMessage); $this->_updateMessage($txtMessage);
if (sizeof($this->errors)) if (sizeof($this->errors))
die('{"hasError" : true, "errors" : ["'.implode('\',\'', $this->errors).'"]}'); die('{"hasError" : true, "errors" : ["'.implode('\',\'', $this->errors).'"]}');
die(true); die(true);
} }
+4 -4
View File
@@ -211,7 +211,7 @@ class ProductControllerCore extends FrontController
/** /**
* Assign price and tax to the template * Assign price and tax to the template
*/ */
private function assignPriceAndTax() protected function assignPriceAndTax()
{ {
$id_customer = (isset($this->context->customer) ? (int)($this->context->customer->id) : 0); $id_customer = (isset($this->context->customer) ? (int)($this->context->customer->id) : 0);
$group_reduction = (100 - Group::getReduction($id_customer)) / 100; $group_reduction = (100 - Group::getReduction($id_customer)) / 100;
@@ -252,7 +252,7 @@ class ProductControllerCore extends FrontController
/** /**
* Assign template vars related to images * Assign template vars related to images
*/ */
private function assignImages() protected function assignImages()
{ {
$images = $this->product->getImages((int)$this->context->cookie->id_lang); $images = $this->product->getImages((int)$this->context->cookie->id_lang);
$productImages = array(); $productImages = array();
@@ -285,7 +285,7 @@ class ProductControllerCore extends FrontController
/** /**
* Assign template vars related to attribute groups and colors * Assign template vars related to attribute groups and colors
*/ */
private function assignAttributesGroups() protected function assignAttributesGroups()
{ {
$colors = array(); $colors = array();
$attributesGroups = $this->product->getAttributesGroups($this->context->language->id); // @todo (RM) should only get groups and not all declination ? $attributesGroups = $this->product->getAttributesGroups($this->context->language->id); // @todo (RM) should only get groups and not all declination ?
@@ -447,7 +447,7 @@ class ProductControllerCore extends FrontController
/** /**
* Assign template vars related to category * Assign template vars related to category
*/ */
private function assignCategory() protected function assignCategory()
{ {
$category = false; $category = false;
if (isset($_SERVER['HTTP_REFERER']) if (isset($_SERVER['HTTP_REFERER'])
+4 -4
View File
@@ -47,7 +47,7 @@ class StoresControllerCore extends FrontController
/** /**
* get formatted string address * get formatted string address
*/ */
private function processStoreAddress($store) protected function processStoreAddress($store)
{ {
$ignore_field = array( $ignore_field = array(
'firstname', 'firstname',
@@ -87,7 +87,7 @@ class StoresControllerCore extends FrontController
/** /**
* Assign template vars for simplified stores * Assign template vars for simplified stores
*/ */
private function assignStoresSimplified() protected function assignStoresSimplified()
{ {
$stores = Db::getInstance()->ExecuteS(' $stores = Db::getInstance()->ExecuteS('
SELECT s.*, cl.name country, st.iso_code state SELECT s.*, cl.name country, st.iso_code state
@@ -110,7 +110,7 @@ class StoresControllerCore extends FrontController
/** /**
* Assign template vars for classical stores * Assign template vars for classical stores
*/ */
private function assignStores() protected function assignStores()
{ {
$distanceUnit = Configuration::get('PS_DISTANCE_UNIT'); $distanceUnit = Configuration::get('PS_DISTANCE_UNIT');
if (!in_array($distanceUnit, array('km', 'mi'))) if (!in_array($distanceUnit, array('km', 'mi')))
@@ -169,7 +169,7 @@ class StoresControllerCore extends FrontController
/** /**
* Display the Xml for showing the nodes in the google map * Display the Xml for showing the nodes in the google map
*/ */
private function displayXmlMaps($stores) protected function displayXmlMaps($stores)
{ {
$dom = new DOMDocument('1.0'); $dom = new DOMDocument('1.0');
$node = $dom->createElement('markers'); $node = $dom->createElement('markers');
+2 -2
View File
@@ -89,7 +89,7 @@ class SupplierControllerCore extends FrontController
/** /**
* Assign template vars if displaying one supplier * Assign template vars if displaying one supplier
*/ */
private function assignOne() protected function assignOne()
{ {
$nbProducts = $this->supplier->getProducts($this->supplier->id, null, null, null, $this->orderBy, $this->orderWay, true); $nbProducts = $this->supplier->getProducts($this->supplier->id, null, null, null, $this->orderBy, $this->orderWay, true);
$this->pagination((int)$nbProducts); $this->pagination((int)$nbProducts);
@@ -104,7 +104,7 @@ class SupplierControllerCore extends FrontController
/** /**
* Assign template vars if displaying the supplier list * Assign template vars if displaying the supplier list
*/ */
private function assignAll() protected function assignAll()
{ {
if (Configuration::get('PS_DISPLAY_SUPPLIERS')) if (Configuration::get('PS_DISPLAY_SUPPLIERS'))
{ {