// Use protected instead of private for classes we can override #PSCFV-1976
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
class AdminAddressesControllerCore extends AdminController
|
||||
{
|
||||
/** @var array countries list */
|
||||
private $countries_array = array();
|
||||
protected $countries_array = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
class AdminAttachmentsControllerCore extends AdminController
|
||||
{
|
||||
|
||||
private $product_attachements = array();
|
||||
protected $product_attachements = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
class AdminAttributeGeneratorControllerCore extends AdminController
|
||||
{
|
||||
private $combinations = array();
|
||||
private $product;
|
||||
protected $combinations = array();
|
||||
protected $product;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -61,7 +61,7 @@ class AdminAttributeGeneratorControllerCore extends AdminController
|
||||
return array();
|
||||
}
|
||||
|
||||
private static function createCombinations($list)
|
||||
protected static function createCombinations($list)
|
||||
{
|
||||
if (count($list) <= 1)
|
||||
return count($list) ? array_map(create_function('$v', 'return (array($v));'), $list[0]) : $list;
|
||||
@@ -135,7 +135,7 @@ class AdminAttributeGeneratorControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
private static function displayAndReturnAttributeJs()
|
||||
protected static function displayAndReturnAttributeJs()
|
||||
{
|
||||
$attributes = Attribute::getAttributes(Context::getContext()->language->id, true);
|
||||
$attribute_js = array();
|
||||
@@ -158,7 +158,7 @@ class AdminAttributeGeneratorControllerCore extends AdminController
|
||||
return $attribute_js;
|
||||
}
|
||||
|
||||
private static function setAttributesImpacts($id_product, $tab)
|
||||
protected static function setAttributesImpacts($id_product, $tab)
|
||||
{
|
||||
$attributes = array();
|
||||
foreach ($tab as $group)
|
||||
@@ -172,7 +172,7 @@ class AdminAttributeGeneratorControllerCore extends AdminController
|
||||
);
|
||||
}
|
||||
|
||||
private static function getAttributesImpacts($id_product)
|
||||
protected static function getAttributesImpacts($id_product)
|
||||
{
|
||||
$tab = array();
|
||||
$result = Db::getInstance()->executeS(
|
||||
|
||||
@@ -30,7 +30,7 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
/**
|
||||
* @var object Category() instance for navigation
|
||||
*/
|
||||
private $_category = null;
|
||||
protected $_category = null;
|
||||
protected $position_identifier = 'id_category_to_move';
|
||||
|
||||
public function __construct()
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
class AdminCmsContentControllerCore extends AdminController
|
||||
{
|
||||
/** @var object adminCMSCategories() instance */
|
||||
private $adminCMSCategories;
|
||||
protected $adminCMSCategories;
|
||||
|
||||
/** @var object adminCMS() instance */
|
||||
private $adminCMS;
|
||||
protected $adminCMS;
|
||||
|
||||
/** @var object Category() instance for navigation*/
|
||||
private static $_category = null;
|
||||
protected static $_category = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class AdminCmsControllerCore extends AdminController
|
||||
{
|
||||
private $_category;
|
||||
protected $_category;
|
||||
|
||||
public $id_cms_category;
|
||||
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
class AdminEmployeesControllerCore extends AdminController
|
||||
{
|
||||
/** @var array profiles list */
|
||||
private $profiles_array = array();
|
||||
protected $profiles_array = array();
|
||||
|
||||
/** @var array themes list*/
|
||||
private $themes = array();
|
||||
protected $themes = array();
|
||||
|
||||
/** @var array tabs list*/
|
||||
private $tabs_list = array();
|
||||
protected $tabs_list = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
class AdminImagesControllerCore extends AdminController
|
||||
{
|
||||
private $start_time = 0;
|
||||
private $max_execution_time = 7200;
|
||||
protected $start_time = 0;
|
||||
protected $max_execution_time = 7200;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -592,7 +592,7 @@ class AdminImportControllerCore extends AdminController
|
||||
));
|
||||
}
|
||||
|
||||
private static function rewindBomAware($handle)
|
||||
protected static function rewindBomAware($handle)
|
||||
{
|
||||
// A rewind wrapper that skip BOM signature wrongly
|
||||
rewind($handle);
|
||||
@@ -600,19 +600,19 @@ class AdminImportControllerCore extends AdminController
|
||||
rewind($handle);
|
||||
}
|
||||
|
||||
private static function getBoolean($field)
|
||||
protected static function getBoolean($field)
|
||||
{
|
||||
return (boolean)$field;
|
||||
}
|
||||
|
||||
private static function getPrice($field)
|
||||
protected static function getPrice($field)
|
||||
{
|
||||
$field = ((float)str_replace(',', '.', $field));
|
||||
$field = ((float)str_replace('%', '', $field));
|
||||
return $field;
|
||||
}
|
||||
|
||||
private static function split($field)
|
||||
protected static function split($field)
|
||||
{
|
||||
if (empty($field))
|
||||
return array();
|
||||
@@ -633,7 +633,7 @@ class AdminImportControllerCore extends AdminController
|
||||
|
||||
}
|
||||
|
||||
private static function createMultiLangField($field)
|
||||
protected static function createMultiLangField($field)
|
||||
{
|
||||
$languages = Language::getLanguages(false);
|
||||
$res = array();
|
||||
@@ -709,14 +709,14 @@ class AdminImportControllerCore extends AdminController
|
||||
return $res;
|
||||
}
|
||||
|
||||
private static function setDefaultValues(&$info)
|
||||
protected static function setDefaultValues(&$info)
|
||||
{
|
||||
foreach (self::$default_values as $k => $v)
|
||||
if (!isset($info[$k]) || $info[$k] == '')
|
||||
$info[$k] = $v;
|
||||
}
|
||||
|
||||
private static function setEntityDefaultValues(&$entity)
|
||||
protected static function setEntityDefaultValues(&$entity)
|
||||
{
|
||||
$members = get_object_vars($entity);
|
||||
foreach (self::$default_values as $k => $v)
|
||||
@@ -724,7 +724,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$entity->$k = $v;
|
||||
}
|
||||
|
||||
private static function fillInfo($infos, $key, &$entity)
|
||||
protected static function fillInfo($infos, $key, &$entity)
|
||||
{
|
||||
if (isset(self::$validators[$key][1]) && self::$validators[$key][1] == 'createMultiLangField' && Tools::getValue('iso_lang'))
|
||||
{
|
||||
@@ -760,7 +760,7 @@ class AdminImportControllerCore extends AdminController
|
||||
* @param string entity 'products' or 'categories'
|
||||
* @return void
|
||||
*/
|
||||
private static function copyImg($id_entity, $id_image = null, $url, $entity = 'products')
|
||||
protected static function copyImg($id_entity, $id_image = null, $url, $entity = 'products')
|
||||
{
|
||||
$tmpfile = tempnam(_PS_TMP_IMG_DIR_, 'ps_import');
|
||||
$watermark_types = explode(',', Configuration::get('WATERMARK_TYPES'));
|
||||
@@ -2108,7 +2108,7 @@ class AdminImportControllerCore extends AdminController
|
||||
return count($tmp);
|
||||
}
|
||||
|
||||
private static function usortFiles($a, $b)
|
||||
protected static function usortFiles($a, $b)
|
||||
{
|
||||
$a = strrev(substr(strrev($a), 0, 14));
|
||||
$b = strrev(substr(strrev($b), 0, 14));
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
class AdminManufacturersControllerCore extends AdminController
|
||||
{
|
||||
/** @var array countries list */
|
||||
private $countries_array = array();
|
||||
protected $countries_array = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class AdminModulesControllerCore extends AdminController
|
||||
/*
|
||||
** @var array map with $_GET keywords and their callback
|
||||
*/
|
||||
private $map = array(
|
||||
protected $map = array(
|
||||
'install' => 'install',
|
||||
'uninstall' => 'uninstall',
|
||||
'configure' => 'getContent',
|
||||
@@ -39,27 +39,27 @@ class AdminModulesControllerCore extends AdminController
|
||||
'delete' => 'delete'
|
||||
);
|
||||
|
||||
private $list_modules_categories = array();
|
||||
private $list_partners_modules = array();
|
||||
private $list_natives_modules = array();
|
||||
protected $list_modules_categories = array();
|
||||
protected $list_partners_modules = array();
|
||||
protected $list_natives_modules = array();
|
||||
|
||||
private $nb_modules_total = 0;
|
||||
private $nb_modules_installed = 0;
|
||||
private $nb_modules_activated = 0;
|
||||
protected $nb_modules_total = 0;
|
||||
protected $nb_modules_installed = 0;
|
||||
protected $nb_modules_activated = 0;
|
||||
|
||||
private $serial_modules = '';
|
||||
private $modules_authors = array();
|
||||
protected $serial_modules = '';
|
||||
protected $modules_authors = array();
|
||||
|
||||
private $id_employee;
|
||||
private $iso_default_country;
|
||||
private $filter_configuration = array();
|
||||
protected $id_employee;
|
||||
protected $iso_default_country;
|
||||
protected $filter_configuration = array();
|
||||
|
||||
private $xml_modules_list = 'api.prestashop.com/xml/modules_list.xml';
|
||||
private $addons_url = 'api.addons.prestashop.com';
|
||||
private $logged_on_addons = false;
|
||||
private $cache_file_modules_list = '/config/xml/modules_list.xml';
|
||||
private $cache_file_default_country_modules_list = '/config/xml/default_country_modules_list.xml';
|
||||
private $cache_file_customer_modules_list = '/config/xml/customer_modules_list.xml';
|
||||
protected $xml_modules_list = 'api.prestashop.com/xml/modules_list.xml';
|
||||
protected $addons_url = 'api.addons.prestashop.com';
|
||||
protected $logged_on_addons = false;
|
||||
protected $cache_file_modules_list = '/config/xml/modules_list.xml';
|
||||
protected $cache_file_default_country_modules_list = '/config/xml/default_country_modules_list.xml';
|
||||
protected $cache_file_customer_modules_list = '/config/xml/customer_modules_list.xml';
|
||||
|
||||
/*
|
||||
** Admin Modules Controller Constructor
|
||||
@@ -779,7 +779,7 @@ class AdminModulesControllerCore extends AdminController
|
||||
** Display Modules Lists
|
||||
**
|
||||
*/
|
||||
private $translationsTab = array();
|
||||
protected $translationsTab = array();
|
||||
public function displayModuleOptions($module)
|
||||
{
|
||||
if (!isset($this->translationsTab['Disable this module']))
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class AdminModulesPositionsControllerCore extends AdminController
|
||||
{
|
||||
private $display_key = 0;
|
||||
protected $display_key = 0;
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class AdminShippingControllerCore extends AdminController
|
||||
{
|
||||
private $_fieldsHandling;
|
||||
protected $_fieldsHandling;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
/*
|
||||
* @var array List of warehouses
|
||||
*/
|
||||
private $warehouses;
|
||||
protected $warehouses;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -273,7 +273,7 @@ class AdminThemesControllerCore extends AdminController
|
||||
* @param string $target_theme_dir relative path to target dir
|
||||
* @return boolean true if success
|
||||
*/
|
||||
private static function copyTheme($base_theme_dir, $target_theme_dir)
|
||||
protected static function copyTheme($base_theme_dir, $target_theme_dir)
|
||||
{
|
||||
$res = true;
|
||||
$base_theme_dir = rtrim($base_theme_dir, '/').'/';
|
||||
|
||||
Reference in New Issue
Block a user