Skip to content

Commit

Permalink
Merge pull request #950 from shreesh-webkul/gli-1831
Browse files Browse the repository at this point in the history
Update: Get localization pack details from qloapps api
  • Loading branch information
rohit053 authored Apr 9, 2024
2 parents 8101fdb + 3b2fef1 commit dafcad5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/admin/AdminLocalizationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public function postProcess()

if (($iso_localization_pack = Tools::getValue('iso_localization_pack')) && Validate::isFileName($iso_localization_pack)) {
if (Tools::getValue('download_updated_pack') == '1' || defined('_PS_HOST_MODE_')) {
$pack = @Tools::file_get_contents(_PS_API_URL_.'/localization/'.$version.'/'.$iso_localization_pack.'.xml');
$pack = @Tools::file_get_contents(_QLO_API_URL_.'/localization/'.$version.'/'.$iso_localization_pack.'.xml');
} else {
$pack = false;
}
Expand Down Expand Up @@ -226,7 +226,7 @@ public function renderForm()
$localizations_pack = false;
$this->tpl_option_vars['options_content'] = $this->renderOptions();

$xml_localization = Tools::simplexml_load_file(_PS_API_URL_.'/rss/localization.xml');
$xml_localization = Tools::simplexml_load_file(_QLO_API_URL_.'/xml/localization.xml');
if (!$xml_localization) {
$localization_file = _PS_ROOT_DIR_.'/localization/localization.xml';
if (file_exists($localization_file)) {
Expand All @@ -248,7 +248,7 @@ public function renderForm()
}

if (!$localizations_pack) {
return $this->displayWarning($this->l('Cannot connect to '._PS_API_URL_));
return $this->displayWarning($this->l('Cannot connect to '._QLO_API_URL_));
}

// Add local localization .xml files to the list if they are not already there
Expand Down

0 comments on commit dafcad5

Please sign in to comment.