// Code cleaning
This commit is contained in:
@@ -192,7 +192,7 @@ class LanguageCore extends ObjectModel
|
||||
|
||||
public function add($autodate = true, $nullValues = false, $only_add = false)
|
||||
{
|
||||
if (!parent::add($autodate))
|
||||
if (!parent::add($autodate, $nullValues))
|
||||
return false;
|
||||
|
||||
if ($only_add)
|
||||
@@ -202,10 +202,9 @@ class LanguageCore extends ObjectModel
|
||||
$this->_generateFiles();
|
||||
|
||||
// @todo Since a lot of modules are not in right format with their primary keys name, just get true ...
|
||||
$resUpdateSQL = $this->loadUpdateSQL();
|
||||
$resUpdateSQL = true;
|
||||
Tools::generateHtaccess();
|
||||
return $resUpdateSQL;
|
||||
$this->loadUpdateSQL();
|
||||
|
||||
return Tools::generateHtaccess();
|
||||
}
|
||||
|
||||
public function toggleStatus()
|
||||
|
||||
@@ -534,18 +534,16 @@ class AdminImagesControllerCore extends AdminController
|
||||
protected function _regenerateNoPictureImages($dir, $type, $languages)
|
||||
{
|
||||
$errors = false;
|
||||
foreach ($type as $imageType)
|
||||
{
|
||||
foreach ($type as $image_type)
|
||||
foreach ($languages as $language)
|
||||
{
|
||||
$file = $dir.$language['iso_code'].'.jpg';
|
||||
if (!file_exists($file))
|
||||
$file = _PS_PROD_IMG_DIR_.Language::getIsoById((int)(Configuration::get('PS_LANG_DEFAULT'))).'.jpg';
|
||||
if (!file_exists($dir.$language['iso_code'].'-default-'.stripslashes($imageType['name']).'.jpg'))
|
||||
if (!ImageManager::resize($file, $dir.$language['iso_code'].'-default-'.stripslashes($imageType['name']).'.jpg', (int)$imageType['width'], (int)$imageType['height']))
|
||||
$file = _PS_PROD_IMG_DIR_.Language::getIsoById((int)Configuration::get('PS_LANG_DEFAULT')).'.jpg';
|
||||
if (!file_exists($dir.$language['iso_code'].'-default-'.stripslashes($image_type['name']).'.jpg'))
|
||||
if (!ImageManager::resize($file, $dir.$language['iso_code'].'-default-'.stripslashes($image_type['name']).'.jpg', (int)$image_type['width'], (int)$image_type['height']))
|
||||
$errors = true;
|
||||
}
|
||||
}
|
||||
return $errors;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user