[-] BO : added important check of the default language for ObjectModel multilang properties
This commit is contained in:
1 parent
e9c618e55b
commit
ce4148b89a
2 files changed
+3
-1
No files matched your search
@@ -859,6 +859,8 @@ abstract class ObjectModelCore
|
|||||||
$values = $this->$field;
|
$values = $this->$field;
|
||||||
if (!is_array($values))
|
if (!is_array($values))
|
||||||
$values = array($this->id_lang => $values);
|
$values = array($this->id_lang => $values);
|
||||||
|
if (!isset($values[Configuration::get('PS_LANG_DEFAULT')]))
|
||||||
|
$values[Configuration::get('PS_LANG_DEFAULT')] = '';
|
||||||
|
|
||||||
foreach ($values as $id_lang => $value)
|
foreach ($values as $id_lang => $value)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -645,7 +645,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path));
|
do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path));
|
||||||
file_put_contents($uniqid_path, $field);
|
file_put_contents($uniqid_path, $field);
|
||||||
$tab = '';
|
$tab = '';
|
||||||
if(!empty($uniqid_path))
|
if (!empty($uniqid_path))
|
||||||
{
|
{
|
||||||
$fd = fopen($uniqid_path, 'r');
|
$fd = fopen($uniqid_path, 'r');
|
||||||
$tab = fgetcsv($fd, MAX_LINE_SIZE, $separator);
|
$tab = fgetcsv($fd, MAX_LINE_SIZE, $separator);
|
||||||
|
|||||||
Reference in new issue
Block a user