// Fields aren't set in getPartnersBlock !
This commit is contained in:
@@ -467,8 +467,18 @@ class AdminHomeControllerCore extends AdminController
|
|||||||
|
|
||||||
public function getBlockPartners()
|
public function getBlockPartners()
|
||||||
{
|
{
|
||||||
|
// @TODO : Check the following fields because they weren't set...
|
||||||
|
$protocol = Tools::getShopProtocol();
|
||||||
|
$isoCountry = Context::getContext()->country->iso_code;
|
||||||
|
$isoUser = '';
|
||||||
|
|
||||||
$stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => AdminHomeController::TIPS_TIMEOUT)));
|
$stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => AdminHomeController::TIPS_TIMEOUT)));
|
||||||
$content = @file_get_contents($protocol.'://api.prestashop.com/partner/preactivation/preactivation-block.php?version=1.0&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).'&protocol='.$protocol.'&url='.urlencode($_SERVER['HTTP_HOST']).'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)Context::getContext()->language->id.'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).'&date_creation='._PS_CREATION_DATE_.'&v='._PS_VERSION_.'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $stream_context);
|
$content = @file_get_contents(
|
||||||
|
'http://api.prestashop.com/partner/preactivation/preactivation-block.php?version=1.0&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).
|
||||||
|
'&protocol='.$protocol.'&url='.urlencode($_SERVER['HTTP_HOST']).'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).
|
||||||
|
'&id_lang='.(int)Context::getContext()->language->id.'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).
|
||||||
|
'&date_creation='._PS_CREATION_DATE_.'&v='._PS_VERSION_.'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $stream_context);
|
||||||
|
|
||||||
if (!$content)
|
if (!$content)
|
||||||
$return = ''; // NOK
|
$return = ''; // NOK
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user