// Revert normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8019 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -128,7 +128,7 @@ class AddressControllerCore extends FrontController
|
||||
$this->context->customer->isLogged(true) === true)
|
||||
$this->errors[] = Tools::displayError('Invalid token');
|
||||
|
||||
if ($country->contains_states AND !$address->id_state)
|
||||
if ((int)($country->contains_states) AND !(int)($address->id_state))
|
||||
$this->errors[] = Tools::displayError('This country requires a state selection.');
|
||||
|
||||
if (!sizeof($this->errors))
|
||||
|
||||
@@ -140,7 +140,7 @@ class AuthControllerCore extends FrontController
|
||||
{
|
||||
if (!$country = new Country($address->id_country, Configuration::get('PS_LANG_DEFAULT')) OR !Validate::isLoadedObject($country))
|
||||
die(Tools::displayError());
|
||||
if ($country->contains_states AND !$address->id_state)
|
||||
if ((int)($country->contains_states) AND !(int)($address->id_state))
|
||||
$this->errors[] = Tools::displayError('This country requires a state selection.');
|
||||
else
|
||||
{
|
||||
|
||||
@@ -185,7 +185,7 @@ class CartControllerCore extends FrontController
|
||||
if ($updateQuantity < 0)
|
||||
{
|
||||
/* if product has attribute, minimal quantity is set with minimal quantity of attribute*/
|
||||
if ($idProductAttribute)
|
||||
if ((int)$idProductAttribute)
|
||||
$minimal_quantity = Attribute::getAttributeMinimalQty($idProductAttribute);
|
||||
else
|
||||
$minimal_quantity = $producToAdd->minimal_quantity;
|
||||
|
||||
@@ -121,7 +121,7 @@ class ContactControllerCore extends FrontController
|
||||
foreach ($fields as $key => $row)
|
||||
{
|
||||
$tmp = 0;
|
||||
if ($row['id_customer'] AND $row['id_customer'] != $customer->id AND $row['email'] != $from)
|
||||
if ((int)$row['id_customer'] AND $row['id_customer'] != $customer->id AND $row['email'] != $from)
|
||||
continue;
|
||||
if ($row['id_order'] != 0 AND Tools::getValue('id_order') != $row['id_order'])
|
||||
continue;
|
||||
@@ -159,7 +159,7 @@ class ContactControllerCore extends FrontController
|
||||
|
||||
if ($contact->customer_service)
|
||||
{
|
||||
if ($id_customer_thread)
|
||||
if ((int)$id_customer_thread)
|
||||
{
|
||||
$ct = new CustomerThread($id_customer_thread);
|
||||
$ct->status = 'open';
|
||||
|
||||
@@ -141,7 +141,7 @@ class ParentOrderControllerCore extends FrontController
|
||||
if ((Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 AND Tools::getValue('step') == 1) OR Configuration::get('PS_ORDER_PROCESS_TYPE') == 1)
|
||||
$this->addJS(_THEME_JS_DIR_.'order-address.js');
|
||||
$this->addJS(_PS_JS_DIR_.'jquery/jquery.fancybox-1.3.4.js');
|
||||
if (Configuration::get('PS_BLOCK_CART_AJAX') OR Configuration::get('PS_ORDER_PROCESS_TYPE') == 1)
|
||||
if ((int)(Configuration::get('PS_BLOCK_CART_AJAX')) OR Configuration::get('PS_ORDER_PROCESS_TYPE') == 1)
|
||||
{
|
||||
$this->addJS(_THEME_JS_DIR_.'cart-summary.js');
|
||||
$this->addJS(_PS_JS_DIR_.'jquery/jquery-typewatch.pack.js');
|
||||
@@ -200,7 +200,7 @@ class ParentOrderControllerCore extends FrontController
|
||||
{
|
||||
$this->context->cart->recyclable = (int)(Tools::getValue('recyclable'));
|
||||
$this->context->cart->gift = (int)(Tools::getValue('gift'));
|
||||
if (Tools::getValue('gift'))
|
||||
if ((int)(Tools::getValue('gift')))
|
||||
{
|
||||
if (!Validate::isMessage($_POST['gift_message']))
|
||||
$this->errors[] = Tools::displayError('Invalid gift message');
|
||||
@@ -427,7 +427,7 @@ class ParentOrderControllerCore extends FrontController
|
||||
if (sizeof($carriers))
|
||||
{
|
||||
$defaultCarrierIsPresent = false;
|
||||
if ($this->context->cart->id_carrier)
|
||||
if ((int)$this->context->cart->id_carrier != 0)
|
||||
foreach ($carriers AS $carrier)
|
||||
if ($carrier['id_carrier'] == (int)$this->context->cart->id_carrier)
|
||||
$defaultCarrierIsPresent = true;
|
||||
|
||||
Reference in New Issue
Block a user