[*] MO : change calls method Tools::displayError() by $name_module->l() && Translations

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15094 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2012-05-09 10:06:23 +00:00
parent 8947a4be80
commit eccb5b7da2
60 changed files with 336 additions and 278 deletions
+8 -6
View File
@@ -32,12 +32,14 @@ require_once(dirname(__FILE__).'/WishList.php');
$error = '';
// Instance of module class for translations
$module = new BlockWishList();
$token = Tools::getValue('token');
$id_product = (int)(Tools::getValue('id_product'));
$id_product_attribute = (int)(Tools::getValue('id_product_attribute'));
if (Configuration::get('PS_TOKEN_ENABLE') == 1 &&
strcmp(Tools::getToken(false), Tools::getValue('static_token')))
$error = Tools::displayError('Invalid token');
$id_product = (int)Tools::getValue('id_product');
$id_product_attribute = (int)Tools::getValue('id_product_attribute');
if (Configuration::get('PS_TOKEN_ENABLE') == 1 && strcmp(Tools::getToken(false), Tools::getValue('static_token')))
$error = $module->l('Invalid token', 'buywishlistproduct');
if (!strlen($error) &&
empty($token) === false &&
@@ -48,7 +50,7 @@ if (!strlen($error) &&
WishList::addBoughtProduct($wishlist['id_wishlist'], $id_product, $id_product_attribute, $cart->id, 1);
}
else
$error = Tools::displayError('You must log in');
$error = $module->l('You must log in', 'buywishlistproduct');
if (empty($error) === false)
echo $error;