// Change URLs calling for prestashop.com
This commit is contained in:
@@ -572,13 +572,13 @@ class Language 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)
|
||||
@@ -591,7 +591,7 @@ class Language 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');
|
||||
|
||||
@@ -780,7 +780,7 @@ if ($lm->getIncludeTradFilename())
|
||||
}
|
||||
|
||||
$stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => 3)));
|
||||
$content = @file_get_contents('http://www.prestashop.com/partner/preactivation/partners.php?version=1.0', false, $stream_context);
|
||||
$content = @file_get_contents('http://api.prestashop.com/partner/preactivation/partners.php?version=1.0', false, $stream_context);
|
||||
if ($content && $content[0] == '<')
|
||||
{
|
||||
$result = simplexml_load_string($content);
|
||||
@@ -1316,7 +1316,7 @@ if ($lm->getIncludeTradFilename())
|
||||
|
||||
<?php
|
||||
|
||||
if (@fsockopen('www.prestashop.com', 80, $errno, $errst, 3))
|
||||
if (@fsockopen('features.prestashop.com', 80, $errno, $errst, 3))
|
||||
{
|
||||
echo '
|
||||
<h2>'.lang('New features in PrestaShop v').INSTALL_VERSION.'</h2>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
$c = addslashes(strtolower($_GET['country_iso_code']));
|
||||
|
||||
$stream_context = @stream_context_create(array('http' => array('method'=>"GET", 'timeout' => 5)));
|
||||
$content = @file_get_contents('http://www.prestashop.com/partner/preactivation/fields.php?version=1.0&partner='.$p.'&country_iso_code='.$c, false, $stream_context);
|
||||
$content = @file_get_contents('http://api.prestashop.com/partner/preactivation/fields.php?version=1.0&partner='.$p.'&country_iso_code='.$c, false, $stream_context);
|
||||
|
||||
if ($content && $content[0] == '<')
|
||||
{
|
||||
@@ -103,7 +103,7 @@
|
||||
if ($_GET['request'] == 'send')
|
||||
{
|
||||
$stream_context = @stream_context_create(array('http' => array('method'=>"GET", 'timeout' => 5)));
|
||||
$url = 'http://www.prestashop.com/partner/preactivation/actions.php?version=1.0&partner='.addslashes($_GET['partner']);
|
||||
$url = 'http://api.prestashop.com/partner/preactivation/actions.php?version=1.0&partner='.addslashes($_GET['partner']);
|
||||
|
||||
// Protect fields
|
||||
foreach ($_GET as $key => $value)
|
||||
|
||||
@@ -210,7 +210,7 @@ if (isFormValid())
|
||||
|
||||
|
||||
$stream_context = @stream_context_create(array('http' => array('timeout' => 5)));
|
||||
$localization_file = @Tools::file_get_contents('http://www.prestashop.com/download/localization_pack.php?country='.$_GET['countryName'], false, $stream_context);
|
||||
$localization_file = @Tools::file_get_contents('http://api.prestashop.com/download/localization_pack.php?country='.$_GET['countryName'], false, $stream_context);
|
||||
if (!$localization_file AND file_exists(dirname(__FILE__).'/../../localization/'.strtolower($_GET['countryName']).'.xml'))
|
||||
$localization_file = @file_get_contents(dirname(__FILE__).'/../../localization/'.strtolower($_GET['countryName']).'.xml');
|
||||
if ($localization_file)
|
||||
|
||||
Reference in New Issue
Block a user