// Change URLs calling for prestashop.com

This commit is contained in:
rGaillard
2011-11-25 18:45:07 +00:00
parent 11a5e1560e
commit f82dbee84d
18 changed files with 42 additions and 42 deletions
+1 -1
View File
@@ -340,7 +340,7 @@ class CurrencyCore extends ObjectModel
public static function refreshCurrencies()
{
// Parse
if (!$feed = Tools::simplexml_load_file('http://www.prestashop.com/xml/currencies.xml'))
if (!$feed = Tools::simplexml_load_file('http://api.prestashop.com/xml/currencies.xml'))
return Tools::displayError('Cannot parse feed.');
// Default feed currency (EUR)
+1 -1
View File
@@ -77,7 +77,7 @@ abstract class ImportModuleCore extends Module
return array_shift($result[0]);
}
public static function getImportModulesOnDisk ()
public static function getImportModulesOnDisk()
{
$modules = Module::getModulesOnDisk(true);
foreach ($modules as $key => $module)
+3 -3
View File
@@ -641,13 +641,13 @@ class LanguageCore extends ObjectModel
return true;
else
{
if(@fsockopen('www.prestashop.com', 80))
if(@fsockopen('api.prestashop.com', 80))
{
$lang = new Language();
$lang->iso_code = $iso_code;
$lang->active = true;
if ($lang_pack = Tools::jsonDecode(Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$iso_code)))
if ($lang_pack = Tools::jsonDecode(Tools::file_get_contents('http://api.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$iso_code)))
{
if (isset($lang_pack->name)
&& isset($lang_pack->version)
@@ -660,7 +660,7 @@ class LanguageCore extends ObjectModel
if ($lang_pack)
{
$flag = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/flags/jpeg/'.$iso_code.'.jpg');
$flag = Tools::file_get_contents('http://api.prestashop.com/download/lang_packs/flags/jpeg/'.$iso_code.'.jpg');
if ($flag != NULL && !preg_match('/<body>/', $flag))
{
$file = fopen(dirname(__FILE__).'/../img/l/'.$insert_id.'.jpg', 'w');
+4 -4
View File
@@ -238,7 +238,7 @@ class LocalizationPackCore
{
if (isset($xml->currencies->currency))
{
if (!$feed = Tools::simplexml_load_file('http://www.prestashop.com/xml/currencies.xml') AND !$feed = @simplexml_load_file(dirname(__FILE__).'/../localization/currencies.xml'))
if (!$feed = Tools::simplexml_load_file('http://api.prestashop.com/xml/currencies.xml') AND !$feed = @simplexml_load_file(dirname(__FILE__).'/../localization/currencies.xml'))
{
$this->_errors[] = Tools::displayError('Cannot parse the currencies XML feed.');
return false;
@@ -301,11 +301,11 @@ class LocalizationPackCore
if ((in_array((string)$attributes['iso_code'], $native_iso_code) AND !$install_mode) OR !in_array((string)$attributes['iso_code'], $native_iso_code))
$errno = 0;
$errstr = '';
if(@fsockopen('www.prestashop.com', 80, $errno, $errstr, 10))
if(@fsockopen('api.prestashop.com', 80, $errno, $errstr, 10))
{
if ($lang_pack = Tools::jsonDecode(Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$attributes['iso_code'])))
if ($lang_pack = Tools::jsonDecode(Tools::file_get_contents('http://api.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$attributes['iso_code'])))
{
if ($content = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/gzip/'.$lang_pack->version.'/'.$attributes['iso_code'].'.gzip'))
if ($content = Tools::file_get_contents('http://api.prestashop.com/download/lang_packs/gzip/'.$lang_pack->version.'/'.$attributes['iso_code'].'.gzip'))
{
$file = _PS_TRANSLATIONS_DIR_.$attributes['iso_code'].'.gzip';
if (file_put_contents($file, $content))
+2 -2
View File
@@ -28,8 +28,8 @@
class UpgraderCore
{
const DEFAULT_CHECK_VERSION_DELAY_HOURS = 24;
public $rss_version_link = 'http://www.prestashop.com/xml/upgrader.xml';
public $rss_md5file_link_dir = 'http://www.prestashop.com/xml/md5/';
public $rss_version_link = 'http://api.prestashop.com/xml/upgrader.xml';
public $rss_md5file_link_dir = 'http://api.prestashop.com/xml/md5/';
/**
* @var boolean contains true if last version is not installed
*/