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
15 changes: 8 additions & 7 deletions components/ILIAS/Language/classes/class.ilObjLanguageExtGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public function __construct($a_data, int $a_id = 0, bool $a_call_by_reference =
$ilClientIniFile = $DIC->clientIni();
$ilCtrl = $DIC->ctrl();
$lng = $DIC->language();
$this->http = $DIC['http'];
$this->refinery = $DIC['refinery'];

// language maintenance strings are defined in administration
$lng->loadLanguageModule("administration");
Expand All @@ -71,19 +73,18 @@ public function __construct($a_data, int $a_id = 0, bool $a_call_by_reference =
$this->type = "lng";
$obj_id_get = 0;

if (!$this->id = $obj_id_get) {
$this->id = ilObjLanguageAccess::_lookupId($lng->getUserLanguage());
}

// do all generic GUI initialisations
parent::__construct($a_data, $this->id, false, true);

if ($this->http->wrapper()->query()->has("obj_id")) {
$obj_id_get = $this->http->wrapper()->query()->retrieve("obj_id", $this->refinery->kindlyTo()->int());
} elseif ($this->http->wrapper()->query()->has("language_folder_obj_ids")) {
$obj_id_get = $this->http->wrapper()->query()->retrieve("language_folder_obj_ids", $this->refinery->kindlyTo()->int());
}

if (!$this->id = $obj_id_get) {
$this->id = ilObjLanguageAccess::_lookupId($lng->getUserLanguage());
}

// do all generic GUI initialisations
parent::__construct($a_data, $this->id, false, true);

// initialize the array to store session variables for extended language maintenance
if (!is_array($this->getSession())) {
Expand Down