Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap

This commit is contained in:
Kevin Granger
2013-06-17 19:19:28 +02:00
29 changed files with 141 additions and 99 deletions
+1 -1
View File
@@ -222,7 +222,7 @@ class AddressCore extends ObjectModel
public function validateController($htmlentities = true)
{
$errors = parent::validateController($htmlentities);
if (!Configuration::get('VATNUMBER_CHECKING'))
if (!Configuration::get('VATNUMBER_MANAGEMENT') || !Configuration::get('VATNUMBER_CHECKING'))
return $errors;
include_once(_PS_MODULE_DIR_.'vatnumber/vatnumber.php');
if (class_exists('VatNumber', false))
+2 -1
View File
@@ -637,7 +637,8 @@ class CartRuleCore extends ObjectModel
FROM `'._DB_PREFIX_.'cart_product` cp
LEFT JOIN `'._DB_PREFIX_.'category_product` catp ON cp.id_product = catp.id_product
WHERE cp.`id_cart` = '.(int)$context->cart->id.'
AND cp.`id_product` IN ('.implode(array_map('intval', $eligibleProductsList), ',').')');
AND cp.`id_product` IN ('.implode(array_map('intval', $eligibleProductsList), ',').')
AND cp.`id_product` <> '.(int)$this->gift_product);
$countMatchingProducts = 0;
$matchingProductsList = array();
foreach ($cartCategories as $cartCategory)
+1
View File
@@ -4565,6 +4565,7 @@ class ProductCore extends ObjectModel
*/
public function setWsAccessories($accessories)
{
$this->deleteAccessories();
foreach ($accessories as $accessory)
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'accessory` (`id_product_1`, `id_product_2`) VALUES ('.(int)$this->id.', '.(int)$accessory['id'].')');
+2 -2
View File
@@ -1855,8 +1855,8 @@ exit;
{
$backtrace = debug_backtrace();
$callee = next($backtrace);
$error = 'Parameter <b>'.$parameter.'</b> in function <b>'.(isset($callee['function']) ? $callee['function'] : '').'()</b> is deprecated in <b>'.$callee['file'].'</b> on line <b>'.(isset($callee['Line']) ? $callee['Line'] : '').'</b><br />';
$message = 'The parameter '.$parameter.' in function '.$callee['function'].' (Line '.$callee['Line'].') is deprecated and will be removed in the next major version.';
$error = 'Parameter <b>'.$parameter.'</b> in function <b>'.(isset($callee['function']) ? $callee['function'] : '').'()</b> is deprecated in <b>'.$callee['file'].'</b> on line <b>'.(isset($callee['line']) ? $callee['line'] : '(undefined)').'</b><br />';
$message = 'The parameter '.$parameter.' in function '.$callee['function'].' (Line '.(isset($callee['line']) ? $callee['line'] : 'undefined').') is deprecated and will be removed in the next major version.';
$class = isset($callee['class']) ? $callee['class'] : null;
Tools::throwDeprecated($error, $message, $class);
+5 -3
View File
@@ -1336,11 +1336,13 @@ class AdminControllerCore extends Controller
foreach ($sub_tabs as $index2 => $sub_tab)
{
// class_name is the name of the class controller
if (Tab::checkTabRights($sub_tab['id_tab']) === true
&& (bool)$sub_tab['active'])
if (Tab::checkTabRights($sub_tab['id_tab']) === true && (bool)$sub_tab['active'])
{
$sub_tabs[$index2]['href'] = $this->context->link->getAdminLink($sub_tab['class_name']);
$sub_tabs[$index2]['current'] = ($sub_tab['class_name'].'Controller' == get_class($this));
}
else
unset($sub_tabs[$index2]);
unset($sub_tabs[$index2]);
}
$tabs[$index]['sub_tabs'] = $sub_tabs;