[-] BO: Fix language deletion with multishop when shops still associate to the language #PSCFV-9244
This commit is contained in:
1 parent
377eb8435d
commit
6f901cea37
1 file changed
+2
-2
@@ -466,7 +466,7 @@ class LanguageCore extends ObjectModel
|
|||||||
|
|
||||||
public function delete()
|
public function delete()
|
||||||
{
|
{
|
||||||
if (!$this->hasMultishopEntries())
|
if (!$this->hasMultishopEntries() || Shop::getContext() == Shop::CONTEXT_ALL)
|
||||||
{
|
{
|
||||||
if (empty($this->iso_code))
|
if (empty($this->iso_code))
|
||||||
$this->iso_code = Language::getIsoById($this->id);
|
$this->iso_code = Language::getIsoById($this->id);
|
||||||
@@ -514,7 +514,7 @@ class LanguageCore extends ObjectModel
|
|||||||
|
|
||||||
if (!parent::delete())
|
if (!parent::delete())
|
||||||
return false;
|
return false;
|
||||||
if (!$this->hasMultishopEntries())
|
if (!$this->hasMultishopEntries() || Shop::getContext() == Shop::CONTEXT_ALL)
|
||||||
{
|
{
|
||||||
// delete images
|
// delete images
|
||||||
$files_copy = array(
|
$files_copy = array(
|
||||||
|
|||||||
Reference in new issue
Block a user