Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,22 @@ public function deleteTranslations(): void

foreach ($langs_to_be_deleted as $lang) {
$this->obj_trans->removeLanguage($lang);
if ($this->obj->getType() === 'lm') {
global $DIC;
$ilDB = $DIC->database();

if ($lang === '-' || $lang === $this->obj_trans->getMasterLanguage()) {
continue;
}

$ilDB->manipulateF(
"DELETE FROM page_object WHERE parent_id = %s AND lang = %s",
['integer', 'text'],
[$this->obj->getId(), $lang]
);
}
}

$this->obj_trans->save();
$this->tpl->setOnScreenMessage('success', $this->lng->txt('saved_successfully'), true);
$this->ctrl->redirect($this, self::CMD_LIST_TRANSLATIONS);
Expand Down
Loading