diff --git a/classes/Validate.php b/classes/Validate.php index 6af8d92c2..9d43e805f 100644 --- a/classes/Validate.php +++ b/classes/Validate.php @@ -724,7 +724,7 @@ class ValidateCore */ public static function isTrackingNumber($tracking_number) { - return preg_match('/^[~:#,%&_=\(\)\.\? \+\-@\/a-zA-Z0-9]+$/', $tracking_number); + return preg_match('/^[~:#,%&_=\(\)\[\]\.\? \+\-@\/a-zA-Z0-9]+$/', $tracking_number); } /** @@ -747,7 +747,7 @@ class ValidateCore public static function isAbsoluteUrl($url) { if (!empty($url)) - return preg_match('/^https?:\/\/[,:#%&_=\(\)\.\? \+\-@\/a-zA-Z0-9]+$/', $url); + return preg_match('/^https?:\/\/[~:#,%&_=\(\)\[\]\.\? \+\-@\/a-zA-Z0-9]+$/', $url); return true; } diff --git a/classes/module/Module.php b/classes/module/Module.php index 2877c1bad..fb70d9075 100644 --- a/classes/module/Module.php +++ b/classes/module/Module.php @@ -215,7 +215,7 @@ abstract class ModuleCore } // Check if module is installed - $result = Db::getInstance()->getRow('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($this->name).'\''); + $result = Module::isInstalled($this->name); if ($result) { $this->_errors[] = $this->l('This module has already been installed.'); @@ -1543,7 +1543,7 @@ abstract class ModuleCore { if (!Cache::isStored('Module::isInstalled'.$module_name)) { - $id_module = Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($module_name).'\''); + $id_module = Module::getModuleIdByName($module_name); Cache::store('Module::isInstalled'.$module_name, (bool)$id_module); } return Cache::retrieve('Module::isInstalled'.$module_name); @@ -1554,7 +1554,7 @@ abstract class ModuleCore if (!Cache::isStored('Module::isEnabled'.$module_name)) { $active = false; - $id_module = Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($module_name).'\''); + $id_module = Module::getModuleIdByName($module_name); if (Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module_shop` WHERE `id_module` = '.(int)$id_module.' AND `id_shop` = '.(int)Context::getContext()->shop->id)) $active = true; Cache::store('Module::isEnabled'.$module_name, (bool)$active); diff --git a/config/defines.inc.php b/config/defines.inc.php index 8ce70b580..ab72ff105 100755 --- a/config/defines.inc.php +++ b/config/defines.inc.php @@ -28,7 +28,8 @@ define('_PS_MODE_DEV_', true); if (_PS_MODE_DEV_) { - @ini_set('display_errors', 'on'); + @ini_set('display_errors', 'on'); + @error_reporting(E_ALL | E_STRICT); define('_PS_DEBUG_SQL_', true); /* Compatibility warning */ define('_PS_DISPLAY_COMPATIBILITY_WARNING_', true); diff --git a/controllers/admin/AdminCustomersController.php b/controllers/admin/AdminCustomersController.php index 67295f8f2..621e9b765 100644 --- a/controllers/admin/AdminCustomersController.php +++ b/controllers/admin/AdminCustomersController.php @@ -669,7 +669,7 @@ class AdminCustomersControllerCore extends AdminController 'count_better_customers' => $count_better_customers, 'shop_is_feature_active' => Shop::isFeatureActive(), 'name_shop' => $shop->name, - 'customer_birthday' => Tools::displayDate($customer->birthday, $this->default_form_language), + 'customer_birthday' => Tools::displayDate($customer->birthday), 'last_update' => Tools::displayDate($customer->date_upd,null , true), 'customer_exists' => Customer::customerExists($customer->email), 'id_lang' => $customer->id_lang, diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index e218feb83..935fe05e3 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -139,6 +139,9 @@ class AuthControllerCore extends FrontController 'HOOK_CREATE_ACCOUNT_TOP' => Hook::exec('displayCustomerAccountFormTop') )); + // Just set $this->template value here in case it's used by Ajax + $this->setTemplate(_PS_THEME_DIR_.'authentication.tpl'); + if ($this->ajax) { // Call a hook to display more information on form @@ -150,12 +153,11 @@ class AuthControllerCore extends FrontController $return = array( 'hasError' => !empty($this->errors), 'errors' => $this->errors, - 'page' => $this->context->smarty->fetch(_PS_THEME_DIR_.'authentication.tpl'), + 'page' => $this->context->smarty->fetch($this->template), 'token' => Tools::getToken(false) ); die(Tools::jsonEncode($return)); } - $this->setTemplate(_PS_THEME_DIR_.'authentication.tpl'); } /** diff --git a/controllers/front/ContactController.php b/controllers/front/ContactController.php index 82c2345a9..8098ad0ee 100644 --- a/controllers/front/ContactController.php +++ b/controllers/front/ContactController.php @@ -281,7 +281,7 @@ class ContactControllerCore extends FrontController $tmp = $order->getProducts(); foreach ($tmp as $key => $val) $products[$row['id_order']][$val['product_id']] = array('value' => $val['product_id'], 'label' => $val['product_name']); - $orders[] = array('value' => $order->id, 'label' => $order->getUniqReference().' - '.Tools::displayDate($date[0],null , 'selected' => (int)Tools::getValue('id_order') == $order->id); + $orders[] = array('value' => $order->id, 'label' => $order->getUniqReference().' - '.Tools::displayDate($date[0],null) , 'selected' => (int)Tools::getValue('id_order') == $order->id); } $this->context->smarty->assign('orderList', $orders); diff --git a/install-dev/classes/controllerHttp.php b/install-dev/classes/controllerHttp.php index 8063ab9af..33c6f9d97 100644 --- a/install-dev/classes/controllerHttp.php +++ b/install-dev/classes/controllerHttp.php @@ -29,7 +29,7 @@ abstract class InstallControllerHttp /** * @var array List of installer steps */ - protected static $steps = array('welcome', 'license', 'system', 'database', 'configure', 'process'); + protected static $steps = array('welcome', 'license', 'system', 'configure', 'database', 'process'); protected static $instances = array(); diff --git a/install-dev/langs/br/install.php b/install-dev/langs/br/install.php index 104f2a514..e379bec88 100644 --- a/install-dev/langs/br/install.php +++ b/install-dev/langs/br/install.php @@ -2,7 +2,7 @@ return array( 'informations' => array( 'phone' => '+1 888.947.6543', - 'support' => 'http://support.prestashop.com/en/', + 'support' => 'https://www.prestashop.com/pt/support', ), 'translations' => array( 'menu_welcome' => 'Escolha seu idioma', diff --git a/install-dev/langs/de/install.php b/install-dev/langs/de/install.php index fedcb2247..b09b8ac8b 100644 --- a/install-dev/langs/de/install.php +++ b/install-dev/langs/de/install.php @@ -2,6 +2,7 @@ return array( 'informations' => array( 'phone' => '+33 (0)1.40.18.30.04', + 'support' => 'https://www.prestashop.com/de/support', ), 'translations' => array( 'menu_welcome' => 'Sprachauswahl', diff --git a/install-dev/langs/en/install.php b/install-dev/langs/en/install.php index ee296298a..cd29befe8 100644 --- a/install-dev/langs/en/install.php +++ b/install-dev/langs/en/install.php @@ -6,7 +6,7 @@ return array( 'documentation_upgrade' => 'http://docs.prestashop.com/display/PS15/Updating+PrestaShop', 'forum' => 'http://www.prestashop.com/forums/', 'blog' => 'http://www.prestashop.com/blog/', - 'support' => 'http://support.prestashop.com/en/', + 'support' => 'https://www.prestashop.com/en/support', ), 'translations' => array( 'menu_welcome' => 'Choose your language', diff --git a/install-dev/langs/es/install.php b/install-dev/langs/es/install.php index e9fb6d41c..78401e6cb 100644 --- a/install-dev/langs/es/install.php +++ b/install-dev/langs/es/install.php @@ -2,6 +2,7 @@ return array( 'informations' => array( 'phone' => '+1 (888) 947-6543', + 'support' => 'https://www.prestashop.com/es/support', ), 'translations' => array( 'menu_welcome' => 'Elegir el idioma', diff --git a/install-dev/langs/it/install.php b/install-dev/langs/it/install.php index 77e6eb468..47bccfb0e 100644 --- a/install-dev/langs/it/install.php +++ b/install-dev/langs/it/install.php @@ -2,6 +2,7 @@ return array( 'informations' => array( 'phone' => '+33 (0)1.40.18.30.04', + 'support' => 'https://www.prestashop.com/it/support', ), 'translations' => array( 'menu_welcome' => 'Scelta della lingua', diff --git a/install-dev/langs/pl/install.php b/install-dev/langs/pl/install.php index d32708c8d..3197cf69b 100644 --- a/install-dev/langs/pl/install.php +++ b/install-dev/langs/pl/install.php @@ -1,5 +1,9 @@ array( + 'phone' => '+33 (0)1.40.18.30.04', + 'support' => 'https://www.prestashop.com/pl/wsparcie-techniczne', + ), 'translations' => array( 'An SQL error occured for entity %1$s: %2$s' => 'Wystąpił błąd SQL w rekordzie %1$s: %2$s', 'Cannot create image "%1$s" for entity "%2$s"' => 'Nie można utworzyć obrazu "%1$s" dla rekordu "%2$s"', diff --git a/install-dev/langs/ru/install.php b/install-dev/langs/ru/install.php index eefaef775..1302da03d 100644 --- a/install-dev/langs/ru/install.php +++ b/install-dev/langs/ru/install.php @@ -1,5 +1,9 @@ array( + 'phone' => '+33 (0)1.40.18.30.04', + 'support' => 'https://www.prestashop.com/en/support', + ), 'translations' => array( 'An SQL error occured for entity %1$s: %2$s' => 'В SQL произошла ошибка для значения %1$s: %2$s', 'Cannot create image "%1$s" for entity "%2$s"' => 'Невозможно создать изображение "%1$s" для значения "%2$s"', @@ -183,7 +187,7 @@ return array( 'menu_license' => 'Лицензионное соглашение', 'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'Ядро PrestaShop разработано на OSL 3.0, а модули и шаблоны PrestaShop разработаны на AFL 3.0.', 'I agree to the above terms and conditions.' => 'Я принимаю правила и условия.', - 'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Внесите свой вклад в улучшение программного обеспечения, отравив анонимное сообщене о Вашей конфгурации.', + 'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Внесите свой вклад в улучшение программного обеспечения, отправив анонимное сообщение о Вашей конфигурации.', 'PHP 5.1.2 or later is not enabled' => 'PHP 5.1.2 или более поздняя версия не активирована', 'Cannot upload files' => 'Невозможно загрузить файлы', 'Cannot create new files and folders' => 'Невозможно создать новые файлы и папки', diff --git a/install-dev/upgrade/sql/1.5.5.0.sql b/install-dev/upgrade/sql/1.5.5.0.sql index 11dcb29b8..e43bee7e7 100644 --- a/install-dev/upgrade/sql/1.5.5.0.sql +++ b/install-dev/upgrade/sql/1.5.5.0.sql @@ -7,4 +7,10 @@ INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VAL ALTER TABLE `PREFIX_webservice_account` CHANGE `class_name` `class_name` VARCHAR(64) NOT NULL DEFAULT 'WebserviceRequest', CHANGE `module_name` `module_name` VARCHAR(64) NULL DEFAULT NULL; -/* PHP:add_module_to_hook(blockcart, actionCartListOverride); */; \ No newline at end of file +/* PHP:add_module_to_hook(blockcart, actionCartListOverride); */; +/* PHP:add_module_to_hook(blockmanufacturer, actionObjectManufacturerDeleteAfter); */; +/* PHP:add_module_to_hook(blockmanufacturer, actionObjectManufacturerAddAfter); */; +/* PHP:add_module_to_hook(blockmanufacturer, actionObjectManufacturerUpdateAfter); */; +/* PHP:add_module_to_hook(blocksupplier, actionObjectSupplierDeleteAfter); */; +/* PHP:add_module_to_hook(blocksupplier, actionObjectSupplierAddAfter); */; +/* PHP:add_module_to_hook(blocksupplier, actionObjectSupplierUpdateAfter); */; diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index 872c448d9..ae99815e7 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -232,6 +232,7 @@ var ajaxCart = { .animate({ 'width': $element.attr('width')*0.66, 'height': $element.attr('height')*0.66, 'opacity': 0.2, 'top': cartBlockOffset.top + 30, 'left': cartBlockOffset.left + 15 }, 1000) .fadeOut(100, function() { ajaxCart.updateCartInformation(jsonData, addedFromProductPage); + $(this).remove(); }); } else @@ -443,7 +444,7 @@ var ajaxCart = { var content = '