[-] BO: Fix language deletion with multishop when shops still associate to the language #PSCFV-9244
This commit is contained in:
1 parent
bc0c8ba2e5
commit
3b5f18a96d
1 file changed
+3
-3
@@ -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(
|
||||||
@@ -831,4 +831,4 @@ class LanguageCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
return (Language::countActiveLanguages() > 1);
|
return (Language::countActiveLanguages() > 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user