// Merge -> revision 8059
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8062 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -28,4 +28,4 @@ include(dirname(__FILE__). '/../../config/config.inc.php');
|
||||
include(dirname(__FILE__). '/../../init.php');
|
||||
include(dirname(__FILE__). '/vatnumber.php');
|
||||
|
||||
echo VatNumber::isApplicable($_GET['id_country']);
|
||||
echo VatNumber::isApplicable(Tools::getValue('id_country'));
|
||||
|
||||
@@ -103,13 +103,8 @@ class VatNumber extends Module
|
||||
|
||||
public static function isApplicable($id_country)
|
||||
{
|
||||
$isApplicable = in_array(Country::getIsoById((int)$id_country), VatNumber::getPrefixIntracomVAT());
|
||||
if ($isApplicable == "")
|
||||
{
|
||||
return 0;
|
||||
return (((int)$id_country AND in_array(Country::getIsoById($id_country), self::getPrefixIntracomVAT())) ? 1 : 0);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static function WebServiceCheck($vatNumber)
|
||||
{
|
||||
@@ -142,7 +137,7 @@ class VatNumber extends Module
|
||||
else
|
||||
sleep(1);
|
||||
}
|
||||
ini_restore('default_socket_timeout');
|
||||
@ini_restore('default_socket_timeout');
|
||||
return array(Tools::displayError('VAT number validation service unavailable'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user