Skip to content

Commit

Permalink
Downloading the latest localization xml file is no more wanted
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleBigDev committed Apr 5, 2018
1 parent d067089 commit ea9d586
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions src/PrestaShopBundle/Cache/LocalizationWarmer.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,13 @@ public function warmUp($cacheDir)
if (is_file($path_cache_file)) {
$localization_file_content = file_get_contents($path_cache_file);
} else {
if (!defined('_PS_IN_TEST_')) {
$localization_file_content = @Tools::file_get_contents(
'http://api.prestashop.com/localization/' . $this->version . '/' . $this->country . '.xml'
);
$localization_file = _PS_ROOT_DIR_ . '/localization/default.xml';

if (!@simplexml_load_string($localization_file_content)) {
$localization_file_content = false;
}
} else {
$localization_file_content = false;
if (file_exists(_PS_ROOT_DIR_ . '/localization/' . $this->country . '.xml')) {
$localization_file = _PS_ROOT_DIR_ . '/localization/' . $this->country . '.xml';
}

if (!$localization_file_content) {
$localization_file = _PS_ROOT_DIR_ . '/localization/default.xml';

if (file_exists(_PS_ROOT_DIR_ . '/localization/' . $this->country . '.xml')) {
$localization_file = _PS_ROOT_DIR_ . '/localization/' . $this->country . '.xml';
}

$localization_file_content = file_get_contents($localization_file);
}
$localization_file_content = file_get_contents($localization_file);

try {
$fs->dumpFile($path_cache_file, $localization_file_content);
Expand Down

0 comments on commit ea9d586

Please sign in to comment.