diff --git a/classes/Tools.php b/classes/Tools.php index a41502356..ea657faa4 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -658,6 +658,8 @@ class ToolsCore public static function safePostVars() { + if (!is_array($_POST)) + return array(); $_POST = array_map(array('Tools', 'htmlentitiesUTF8'), $_POST); } diff --git a/classes/order/Order.php b/classes/order/Order.php index 285c2543e..8cf3c5552 100644 --- a/classes/order/Order.php +++ b/classes/order/Order.php @@ -1172,8 +1172,12 @@ class OrderCore extends ObjectModel { $number = (int)Configuration::get('PS_DELIVERY_NUMBER'); if (!$number) - throw new PrestaShopException('Invalid delivery number'); - + { + //if delivery number is not set or wrong, we set a default one. + Configuration::updateValue('PS_DELIVERY_NUMBER', 1); + $number = 1; + } + // Set delivery number on invoice $order_invoice->delivery_number = $number; $order_invoice->delivery_date = date('Y-m-d H:i:s'); diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 8e4c93ae5..19711bb85 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -597,62 +597,67 @@ class AdminProductsControllerCore extends AdminController protected function processBulkDelete() { - if (is_array($this->boxes) && !empty($this->boxes)) + if ($this->tabAccess['delete'] === '1') { - $object = new $this->className(); - - if (isset($object->noZeroObject) && - // Check if all object will be deleted - (count(call_user_func(array($this->className, $object->noZeroObject))) <= 1 || count($_POST[$this->table.'Box']) == count(call_user_func(array($this->className, $object->noZeroObject))))) - $this->errors[] = Tools::displayError('You need at least one object.').' '.$this->table.'
'.Tools::displayError('You cannot delete all of the items.'); - else + if (is_array($this->boxes) && !empty($this->boxes)) { - $success = 1; - $products = Tools::getValue($this->table.'Box'); - if (is_array($products) && ($count = count($products))) + $object = new $this->className(); + + if (isset($object->noZeroObject) && + // Check if all object will be deleted + (count(call_user_func(array($this->className, $object->noZeroObject))) <= 1 || count($_POST[$this->table.'Box']) == count(call_user_func(array($this->className, $object->noZeroObject))))) + $this->errors[] = Tools::displayError('You need at least one object.').' '.$this->table.'
'.Tools::displayError('You cannot delete all of the items.'); + else { - // Deleting products can be quite long on a cheap server. Let's say 1.5 seconds by product (I've seen it!). - if (intval(ini_get('max_execution_time')) < round($count * 1.5)) - ini_set('max_execution_time', round($count * 1.5)); - - if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) - $stock_manager = StockManagerFactory::getManager(); - - foreach ($products as $id_product) + $success = 1; + $products = Tools::getValue($this->table.'Box'); + if (is_array($products) && ($count = count($products))) { - $product = new Product((int)$id_product); - /* - * @since 1.5.0 - * It is NOT possible to delete a product if there are currently: - * - physical stock for this product - * - supply order(s) for this product - */ - if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $product->advanced_stock_management) + // Deleting products can be quite long on a cheap server. Let's say 1.5 seconds by product (I've seen it!). + if (intval(ini_get('max_execution_time')) < round($count * 1.5)) + ini_set('max_execution_time', round($count * 1.5)); + + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + $stock_manager = StockManagerFactory::getManager(); + + foreach ($products as $id_product) { - $physical_quantity = $stock_manager->getProductPhysicalQuantities($product->id, 0); - $real_quantity = $stock_manager->getProductRealQuantities($product->id, 0); - if ($physical_quantity > 0 || $real_quantity > $physical_quantity) - $this->errors[] = sprintf(Tools::displayError('You cannot delete the product #%d because there is physical stock left or supply orders in progress.'), $product->id); + $product = new Product((int)$id_product); + /* + * @since 1.5.0 + * It is NOT possible to delete a product if there are currently: + * - physical stock for this product + * - supply order(s) for this product + */ + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $product->advanced_stock_management) + { + $physical_quantity = $stock_manager->getProductPhysicalQuantities($product->id, 0); + $real_quantity = $stock_manager->getProductRealQuantities($product->id, 0); + if ($physical_quantity > 0 || $real_quantity > $physical_quantity) + $this->errors[] = sprintf(Tools::displayError('You cannot delete the product #%d because there is physical stock left or supply orders in progress.'), $product->id); + else + $success &= $product->delete(); + } else $success &= $product->delete(); } - else - $success &= $product->delete(); } + + if ($success) + { + $id_category = (int)Tools::getValue('id_category'); + $category_url = empty($id_category) ? '' : '&id_category='.(int)$id_category; + $this->redirect_after = self::$currentIndex.'&conf=2&token='.$this->token.$category_url; + } + else + $this->errors[] = Tools::displayError('An error occurred while deleting selection.'); } - - if ($success) - { - $id_category = (int)Tools::getValue('id_category'); - $category_url = empty($id_category) ? '' : '&id_category='.(int)$id_category; - $this->redirect_after = self::$currentIndex.'&conf=2&token='.$this->token.$category_url; - } - else - $this->errors[] = Tools::displayError('An error occurred while deleting selection.'); } + else + $this->errors[] = Tools::displayError('You must select at least one element to delete.'); } else - $this->errors[] = Tools::displayError('You must select at least one element to delete.'); + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); } public function processProductAttribute() diff --git a/controllers/admin/AdminTrackingController.php b/controllers/admin/AdminTrackingController.php index 2a026b8c8..3db972175 100644 --- a/controllers/admin/AdminTrackingController.php +++ b/controllers/admin/AdminTrackingController.php @@ -66,9 +66,6 @@ class AdminTrackingControllerCore extends AdminController $this->clearListOptions(); $this->content .= call_user_func(array($this,$matches[0])); } - - $this->content .= $this->getCustomListProductsDisabled(); - $this->context->smarty->assign(array( 'content' => $this->content, 'url_post' => self::$currentIndex.'&token='.$this->token, diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php index 26a9d18a4..72da317ed 100644 --- a/controllers/front/ParentOrderController.php +++ b/controllers/front/ParentOrderController.php @@ -59,7 +59,9 @@ class ParentOrderControllerCore extends FrontController // Redirect to the good order process if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 && Dispatcher::getInstance()->getController() != 'order') Tools::redirect('index.php?controller=order'); - if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 && Dispatcher::getInstance()->getController() != 'orderopc') + + //if getMobileDevice is on a mobile or a tablet we don't redirect to OPC + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 && Dispatcher::getInstance()->getController() != 'orderopc' && !$this->context->getMobileDevice()) { if (isset($_GET['step']) && $_GET['step'] == 3) Tools::redirect('index.php?controller=order-opc&isPaymentStep=true'); diff --git a/install-dev/langs/it/install.php b/install-dev/langs/it/install.php index 4ab432827..994f45997 100644 --- a/install-dev/langs/it/install.php +++ b/install-dev/langs/it/install.php @@ -4,30 +4,30 @@ array ( 'menu_welcome' => 'Benvenuto!', 'menu_system' => 'Compatibilità sistema', - 'menu_database' => NULL, + 'menu_database' => 'Database', 'menu_configure' => 'Configurazione negozio', 'menu_process' => 'Installazione', - 'Choose the installer language:' => NULL, - 'Field required' => NULL, + 'Choose the installer language:' => 'Scegli la lingua di installazione', + 'Field required' => 'Campo richiesto', 'Invalid shop name' => 'nome negozio non valido', 'Your firstname contains some invalid characters' => 'Il tuo nome contiene dei caratteri non validi', 'Your lastname contains some invalid characters' => 'Il tuo cognome contiene dei caratteri non validi', - 'The password is incorrect (alphanumeric string with at least 8 characters)' => NULL, - 'Password and its confirmation are different' => NULL, - 'This e-mail address is invalid' => NULL, + 'The password is incorrect (alphanumeric string with at least 8 characters)' => 'La password non è corretta (stringa alfanumerica di almeno 8 caratteri)', + 'Password and its confirmation are different' => 'La password e la conferma non coincidono', + 'This e-mail address is invalid' => 'L\'indirizzo email non è valido', 'The uploaded file exceeds the upload_max_filesize directive in php.ini' => 'Il file inviato supera la dimensione massima autorizzata.', 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form' => 'Il file inviato supera la dimensione massima autorizzata.', 'The uploaded file was only partially uploaded' => 'Il file è stato parzialmente inviato.', - 'No file was uploaded' => NULL, + 'No file was uploaded' => 'Nessun file caricato', 'Missing a temporary folder' => 'Manca la cartella temporanea di ricezione dell\'invio di file. Consulta il tuo amministratore.', 'Failed to write file to disk' => 'Impossibile scrivere il file sul disco', 'File upload stopped by extension' => 'Invio file interrotto a causa di estensione errata', - 'No error code available' => NULL, - 'This is not a valid image file' => NULL, - 'Image type is not supported' => NULL, - 'Image folder %s is not writable' => NULL, - 'Cannot upload the file' => NULL, - 'Lingerie and Adult' => NULL, + 'No error code available' => 'Nessun codice di errore disponibile', + 'This is not a valid image file' => 'Questo non è un file di immagine valido', + 'Image type is not supported' => 'Tipo immagine non supportato', + 'Image folder %s is not writable' => 'La cartella immagini %s non è scrivibile', + 'Cannot upload the file' => 'Non posso caricare il file', + 'Lingerie and Adult' => 'Biancheria e adulti', 'Animals and Pets' => 'Animali', 'Art and Culture' => 'Cultura e svaghi', 'Babies' => 'Articoli per bambini', @@ -47,44 +47,44 @@ 'Shoes and accessories' => 'Scarpe e accessori', 'Sports and Entertainment' => 'Sport e divertimenti', 'Travel' => 'Viaggi e turismo', - 'Database is connected' => NULL, - 'A test e-mail has been sent to %s' => NULL, - 'An error occurred while sending email, please verify your parameters' => NULL, - 'Create settings.inc file' => NULL, - 'Create database tables' => NULL, - 'Populate database tables' => NULL, - 'Configure shop information' => NULL, - 'Install modules' => NULL, - 'Install demonstration data' => NULL, - 'Install theme' => NULL, - 'PHP parameters:' => NULL, - 'Is PHP 5.1.2 or later installed ?' => NULL, - 'Can upload files ?' => NULL, - 'Can create new files and folders ?' => NULL, - 'Is GD Library installed ?' => NULL, - 'Is MySQL support is on ?' => NULL, - 'WRecursive write permissions on files and folders:' => NULL, - 'Can open external URLs ?' => NULL, - 'Is PHP register global option off (recommended) ?' => NULL, - 'Is GZIP compression activated (recommended) ?' => NULL, - 'Is Mcrypt extension available (recommended) ?' => NULL, - 'Is PHP magic quotes option deactivated (recommended) ?' => NULL, - 'Is Dom extension loaded ?' => NULL, - 'Is PDO MySQL extension loaded ?' => NULL, + 'Database is connected' => 'Il database è connesso', + 'A test e-mail has been sent to %s' => 'Una mail di test è stata inviata a %s', + 'An error occurred while sending email, please verify your parameters' => 'Un errore nell\'invio mail, per favore verifica i parametri', + 'Create settings.inc file' => 'Crea file settings.inc', + 'Create database tables' => 'Crea tabella database', + 'Populate database tables' => 'Popolo le tabelle database', + 'Configure shop information' => 'Configura informazioni negozio', + 'Install modules' => 'Installa moduli', + 'Install demonstration data' => 'Installo dati di esempio', + 'Install theme' => 'Installo tema', + 'PHP parameters:' => 'Parametri PHP', + 'Is PHP 5.1.2 or later installed ?' => 'PHP 5.1.2 o successivi installato?', + 'Can upload files ?' => 'Posso caricare files?', + 'Can create new files and folders ?' => 'Posso creare nuovi file e cartelle?', + 'Is GD Library installed ?' => 'Le liberie GD sono installate?', + 'Is MySQL support is on ?' => 'Il supporto MySQL è su on?', + 'Write permissions on files:' => 'Permessi di scrittura sui file?', + 'Can open external URLs ?' => 'Posso aprire URL esterni?', + 'Is PHP register global option off (recommended) ?' => 'PHP register Global è su OFF (raccomandato)?', + 'Is GZIP compression activated (recommended) ?' => 'La compressione GZIP è attivata (raccomandato)?', + 'Is Mcrypt extension available (recommended) ?' => 'Estensione Mycrypt è disponibile (raccomandato)?', + 'Is PHP magic quotes option deactivated (recommended) ?' => 'PHP magic quotes è disattivato (raccomandato)?', + 'Is Dom extension loaded ?' => 'Estensione Dom è caricata?', + 'Is PDO MySQL extension loaded ?' => 'Estensione PDO MySQL è caricata?', 'Shop settings and merchant account information' => 'Informazioni sul venditore', 'Shop name:' => 'Nome del negozio:', 'Main activity:' => 'Attività principale', - 'Please choose your main activity' => NULL, + 'Please choose your main activity' => 'Per favore scegli l\'attività principale', 'Other activity...' => 'Altre attività ...', 'This information is not required, it will only be used for statistical purposes. This information does not change anything in your store.' => 'Queste informazioni non sono obbligatorie, saranno utilizzate a fini statistici. Queste informazioni non cambieranno nulla nel tuo negozio.', - 'Install demo products:' => NULL, + 'Install demo products:' => 'Installa prodotti demo', 'Yes' => 'Sì', 'No' => 'No', - 'Demo products are a good way to learn how to use PrestaShop. You should install them if you are not familiar with it.' => NULL, + 'Demo products are a good way to learn how to use PrestaShop. You should install them if you are not familiar with it.' => 'Installare i prodotti demo è un buon metodo per imparare ad utilizzare PrestaShop. Puoi installarli se non hai familiarità con PrestaShop', 'Default country:' => 'Nazione di default:', - 'Select your country' => NULL, + 'Select your country' => 'Seleziona la tua nazione', 'Shop timezone:' => 'Fuso orario del negozio:', - 'Select your timezone' => NULL, + 'Select your timezone' => 'Seleziona la tua zona oraria', 'Shop logo:' => 'Logo del negozio:', 'Recommended dimensions:' => 'Dimensioni suggerite:', 'First name:' => 'Nome:', @@ -93,22 +93,22 @@ 'Shop password:' => 'Password del negozio', 'Re-type to confirm:' => 'Conferma la password:', 'Receive this information by e-mail' => 'Riceverò le mie informazioni tramite e-mail', - 'Warning: You will receive this information only if your e-mail configuration is correct.' => NULL, + 'Warning: You will receive this information only if your e-mail configuration is correct.' => 'Attenzione: riceverai queste informazioni per email solo le la configurazione è corretta', 'Configure your database by filling out the following fields:' => 'Configura il tuo database riempiendo i campi qui sotto:', - 'You have to create a database, help available in our online documentation.' => null, - 'Database server address:' => NULL, - 'If you want to use a different port, add :XX after your server address where XX is your port number.' => NULL, + 'You have to create a database, help available in our online documentation.' => 'Devi creare un database, puoi trovare aiuto nella nostra documentazione online.', + 'Database server address:' => 'Indirizzo server Database', + 'If you want to use a different port, add :XX after your server address where XX is your port number.' => 'Se vuoi utilizzare una porta differente aggiungi :XX dopo il tuo indirizzo dove XX è il numero della porta', 'Database name:' => 'Nome database:', 'Database login:' => 'Login database', 'Database password:' => 'Password database', 'Database Engine:' => 'Motore database', 'Tables prefix:' => 'Prefisso tabelle', - 'Drop existing tables (mode dev):' => NULL, - 'Verify now!' => NULL, - 'E-mail delivery set-up' => NULL, + 'Drop existing tables (mode dev):' => 'Cancella le tabelle esistenti (modalità DEV)', + 'Verify now!' => 'Controlla ora!', + 'E-mail delivery set-up' => 'Settaggi invio email', 'Configure SMTP manually (advanced users only)' => 'Configura l\'invio SMTP (solo per utenti esperti)', - 'By default, the PHP mail() function is used' => NULL, - 'SMTP server address:' => NULL, + 'By default, the PHP mail() function is used' => 'Di default PHP mail() è utilizzato', + 'SMTP server address:' => 'Indirizzo server SMTP', 'Encryption:' => 'Criptaggio:', 'None' => 'Nessuno', 'Port:' => 'Porta:', @@ -118,18 +118,18 @@ 'Send me a test email!' => 'Inviami una e-mail di prova!', 'Next' => 'Successivo', 'Back' => 'Precedente', - 'Official forum' => NULL, - 'Support' => NULL, - 'Documentation' => NULL, + 'Official forum' => 'Forum ufficiale', + 'Support' => 'Supporto', + 'Documentation' => 'Documentazione', 'Contact us!' => 'Contattaci!', - 'Forum' => NULL, + 'Forum' => 'Forum', 'Blog' => 'Il blog', - 'Done!' => NULL, - 'An error occured during installation...' => NULL, - 'You can use the links on the left column to go back to the previous steps, or restart the installation process by clicking here.' => NULL, + 'Done!' => 'Fatto!', + 'An error occured during installation...' => 'Un errore è avvenuto durante l\'installazione…', + 'You can use the links on the left column to go back to the previous steps, or restart the installation process by clicking here.' => 'Puoi utilizzare il link nella colonna sinistra per tornare indietro ai passi precedenti, oppure ricominciare l\installazione cliccando qui.', 'Your installation is finished!' => 'Installazione terminata!', - 'You have just finished installing your shop. Thank you for using PrestaShop!' => NULL, - 'Please remember your login information:' => NULL, + 'You have just finished installing your shop. Thank you for using PrestaShop!' => 'Hai finito di installare il tuo negozio. Grazie per aver scelto PrestaShop', + 'Please remember your login information:' => 'Per favore ricordati i parametri di login', 'WARNING: For security purposes, you must delete the "install" folder.' => 'ATTENZIONE: per motivi di sicurezza, adesso devi cancellare la cartella \'install\'.', 'Back Office' => 'Back Office', 'Manage your store using your Back Office. Manage your orders and customers, add modules, change themes, etc.' => 'Amministra il tuo negozio con il tuo back office. Gestisci ordini e clienti, aggiungi moduli, modifica il tuo tema, etc....', @@ -137,52 +137,52 @@ 'Front Office' => 'Front Office', 'Discover your store as your future customers will see it!' => 'Scopri il tuo negozio come lo vedranno i tuoi futuri clienti!', 'Discover your store' => 'Scopri il mio negozio', - 'Required set-up. Please verify the following checklist items are true.' => NULL, - 'Your configuration is valid, click next to continue!' => NULL, + 'Required set-up. Please verify the following checklist items are true.' => 'Impostazioni obbligatorie. Per favore verifica che la lista sia ok', + 'Your configuration is valid, click next to continue!' => 'La tua configurazione è valida, clicca su avanti per continuare', 'Your configuration is invalid. Please fix the issues below:' => 'La tua configurazione non è valida,
correggi questi problemi:', 'Optional set-up' => 'Parametri opzionali', - 'Refresh these settings' => NULL, - 'Welcome to the PrestaShop %s Installer.' => NULL, + 'Refresh these settings' => 'Aggiorna questi settaggi', + 'Welcome to the PrestaShop %s Installer.' => 'Benvenuto nell\'installante di PrestaShop %s .', 'The installation process should take only few minutes!' => 'Il processo di installazione dovrebbe durare solo pochi minuti!', - 'If you need help, do not hesitate to check our documentation or to contact our support team: %2$s' => NULL, + 'If you need help, do not hesitate to check our documentation or to contact our support team: %2$s' => 'Se hai bisogno di aiuto non asitare a guardare our documentation o contattare il nostro supporto: %2$s', 'Did you know?' => 'Lo sapevi?', - 'PrestaShop and its community offers over 40 different languages for free, directly accessible from your Back Office on the Localization tab.' => NULL, + 'PrestaShop and its community offers over 40 different languages for free, directly accessible from your Back Office on the Localization tab.' => 'PrestaShop e la sua comunità offre 40 diverse lingue gratuite, direttamente accessibile nel tuo back office nel tab Traduzioni', 'Licenses Agreement' => 'Contratto di Licenza', - 'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => NULL, + 'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'Il core di PrestaShop è rilasicata sollo licenza OSL 3.0 mentre i moduli e i temi prestashop sono rilasciati sotto licenza AFL 3.0', 'I agree to the above terms and conditions.' => 'Accetto i termini e le condizioni del contratto seguente.', - 'I agree to participate in improving the solution by sending anonymous information about my configuration.' => NULL, - 'If you have any questions, please visit our documentation and community forum.' => NULL, + 'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Accetto di partecipare nell\'implementare la soluzione inviando informazioni anonime sulla mia configurazione', + 'If you have any questions, please visit our documentation and community forum.' => 'Se hai altre questioni visita documentazione e forum comunità.', 'Test message from PrestaShop' => 'Installazione di Prestashop - prova del server di e-mail', 'This is a test message, your server is now available to send email' => 'Questo è un messaggio di testo. Il tuo server è adesso impostato per inviare e-mail.', - '%s - Login information' => NULL, - 'An SQL error occured for entity %1$s: %2$s' => NULL, - 'Cannot create image "%1$s" for entity "%2$s"' => NULL, - 'Cannot create image "%1$s" (bad permissions on folder "%2$s")' => NULL, - 'Cannot create image "%s"' => NULL, - 'SQL error on query %s' => NULL, - 'Server name is not valid' => NULL, - 'You must enter a database name' => NULL, - 'You must enter a database login' => NULL, - 'Tables prefix is invalid' => NULL, - 'Wrong engine chosen for MySQL' => NULL, - 'Cannot convert database data to utf-8' => NULL, - 'At least one table with same prefix was already found, please change your prefix or drop your database' => NULL, - 'Database Server is not found. Please verify the login, password and server fields' => NULL, - 'Connection to MySQL server succeeded, but database "%s" not found' => NULL, - 'Engine innoDB is not supported by your MySQL server, please use MyISAM' => NULL, - '%s file is not writable (check permissions)' => NULL, - '%s folder is not writable (check permissions)' => NULL, - 'Cannot write settings file' => NULL, - 'Database structure file not found' => NULL, - 'Cannot create group shop' => NULL, - 'Cannot create shop' => NULL, - 'Cannot create shop URL' => NULL, - 'File "language.xml" not found for language iso "%s"' => NULL, - 'File "language.xml" not valid for language iso "%s"' => NULL, - 'Cannot install language "%s"' => NULL, - 'Cannot create admin account' => NULL, - 'Cannot install module "%s"' => NULL, - 'Fixtures class "%s" not found' => NULL, - '"%s" must be an instane of "InstallXmlLoader"' => NULL, + '%s - Login information' => '%s - informazioni Login', + 'An SQL error occured for entity %1$s: %2$s' => 'Errore SQL %1$s: %2$s', + 'Cannot create image "%1$s" for entity "%2$s"' => 'Non posso creare immagine "%1$s" for entity "%2$s"', + 'Cannot create image "%1$s" (bad permissions on folder "%2$s")' => 'Non posso creare limmagine "%1$s" (bad permissions on folder "%2$s")', + 'Cannot create image "%s"' => 'Non posso creare immagine "%s"', + 'SQL error on query %s' => 'SQL errore nella query %s', + 'Server name is not valid' => 'Nome server non valido', + 'You must enter a database name' => 'Devi inserire un nome database', + 'You must enter a database login' => 'Devi inserire una password per il database', + 'Tables prefix is invalid' => 'Prefisso tabelle non valido', + 'Wrong engine chosen for MySQL' => 'Engine scelta non valida per MySQL', + 'Cannot convert database data to utf-8' => 'Non posso convertire i dati del database in utf-8', + 'At least one table with same prefix was already found, please change your prefix or drop your database' => 'Almeno una tabella con lo stesso prefisso è stata trovata, per favore cambia il prefisso o cancella il database', + 'Database Server is not found. Please verify the login, password and server fields' => 'Server Database non trovato. Per favore verifica login, password e il campo server', + 'Connection to MySQL server succeeded, but database "%s" not found' => 'Connessione a MySQL server riuscita, ma il database "%s" non è stato trovato', + 'Engine innoDB is not supported by your MySQL server, please use MyISAM' => 'InnoDB non è supportato dal tuo server MySQL, per favore utilizza MyISAM', + '%s file is not writable (check permissions)' => 'Il file %s non è scrivibile (verifica i permessi)', + '%s folder is not writable (check permissions)' => 'La cartella %s non è scrivibile (verifica i permessi)', + 'Cannot write settings file' => 'Non posso scrivere il file settings', + 'Database structure file not found' => 'Struttura del database non trovata', + 'Cannot create group shop' => 'Non posso accedere al gruppo shop', + 'Cannot create shop' => 'Non posso creare shop', + 'Cannot create shop URL' => 'Non posso creare url shop', + 'File "language.xml" not found for language iso "%s"' => 'File "language.xml" non trovato per iso "%s"', + 'File "language.xml" not valid for language iso "%s"' => 'File "language.xml" non valido per iso "%s"', + 'Cannot install language "%s"' => 'Non posso installare la lingua "%s"', + 'Cannot create admin account' => 'Non posso creare account admin', + 'Cannot install module "%s"' => 'Non posso installare il modulo "%s"', + 'Fixtures class "%s" not found' => 'Fixtures class "%s" non trovata', + '"%s" must be an instane of "InstallXmlLoader"' => '"%s" deve essere una istanza di "InstallXmlLoader"', ), -); \ No newline at end of file +); diff --git a/install-dev/upgrade/php/editorial_update.php b/install-dev/upgrade/php/editorial_update.php index d191fc10e..cb7616273 100644 --- a/install-dev/upgrade/php/editorial_update.php +++ b/install-dev/upgrade/php/editorial_update.php @@ -36,7 +36,7 @@ function editorial_update() `id_editorial` int(10) unsigned NOT NULL auto_increment, `body_home_logo_link` varchar(255) NOT NULL, PRIMARY KEY (`id_editorial`)) - ENGINE=MyISAM DEFAULT CHARSET=utf8'); + ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); Db::getInstance()->execute(' CREATE TABLE `'._DB_PREFIX_.'editorial_lang` ( @@ -47,7 +47,7 @@ function editorial_update() `body_paragraph` text NOT NULL, `body_logo_subheading` varchar(255) NOT NULL, PRIMARY KEY (`id_editorial`, `id_lang`)) - ENGINE=MyISAM DEFAULT CHARSET=utf8'); + ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); if (file_exists(dirname(__FILE__).'/../../modules/editorial/editorial.xml')) { diff --git a/install-dev/upgrade/php/fix_cms_shop_1520.php b/install-dev/upgrade/php/fix_cms_shop_1520.php new file mode 100755 index 000000000..4630c844c --- /dev/null +++ b/install-dev/upgrade/php/fix_cms_shop_1520.php @@ -0,0 +1,67 @@ + +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 15469 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +function fix_cms_shop_1520() +{ + $res = true; + $db = Db::getInstance(); + //test if cms_shop with 2 underscore is present to rename it. + $result = $db->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'_cms_shop"'); + if (!is_array($result) || !count($result) || !$result) + { + $res &= create_table_cms_shop(); + if ($res) + insert_table_cms_to_cms_shop(); + } + //test if cms_shop with 1 underscore is present and create if not. + $result = $db->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'cms_shop"'); + if (!is_array($result) || !count($result) || !$result) + { + $res &= create_table_cms_shop(); + if ($res) + insert_table_cms_to_cms_shop(); + } +} + +function insert_table_cms_to_cms_shop() +{ + // /!\ : _cms_shop and _cms are wrong tables name (fixed in 1.5.0.12.sql : upgrade_cms_15_rename() ) + $res &= Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'cms_shop` (id_shop, id_cms) + (SELECT 1, id_cms FROM '._DB_PREFIX_.'_cms)'); +} + +function create_table_cms_shop() +{ + return Db::getInstance()->execute( + 'CREATE TABLE `'._DB_PREFIX_.'cms_shop` ( + `id_cms` INT( 11 ) UNSIGNED NOT NULL, + `id_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_cms`, `id_shop`), + KEY `id_shop` (`id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); +} \ No newline at end of file diff --git a/install-dev/upgrade/php/migrate_block_info_to_cms_block.php b/install-dev/upgrade/php/migrate_block_info_to_cms_block.php index 0a046c81f..8e2c3daec 100644 --- a/install-dev/upgrade/php/migrate_block_info_to_cms_block.php +++ b/install-dev/upgrade/php/migrate_block_info_to_cms_block.php @@ -68,7 +68,7 @@ function migrate_block_info_to_cms_block() `position` int(10) unsigned NOT NULL default \'0\', `display_store` tinyint(1) unsigned NOT NULL default \'1\', PRIMARY KEY (`id_cms_block`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8'); + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); $res &= Db::getInstance()->execute(' INSERT INTO `'._DB_PREFIX_.'cms_block` (`id_cms_category`, `location`, `position`) VALUES(1, 0, 0)'); $res &= Db::getInstance()->execute(' @@ -77,7 +77,7 @@ function migrate_block_info_to_cms_block() `id_lang` int(10) unsigned NOT NULL, `name` varchar(40) NOT NULL default \'\', PRIMARY KEY (`id_cms_block`, `id_lang`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8'); + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); $query_lang = 'INSERT INTO `'._DB_PREFIX_.'cms_block_lang` (`id_cms_block`, `id_lang`) VALUES'; foreach ($languages AS $language) @@ -92,7 +92,7 @@ function migrate_block_info_to_cms_block() `id_cms` int(10) unsigned NOT NULL, `is_category` tinyint(1) unsigned NOT NULL, PRIMARY KEY (`id_cms_block_page`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8'); + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); $res &= Db::getInstance()->getValue('REPLACE INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("FOOTER_CMS", "")'); diff --git a/install-dev/upgrade/php/update_module_product_comments.php b/install-dev/upgrade/php/update_module_product_comments.php index 410360cc9..6c945b405 100644 --- a/install-dev/upgrade/php/update_module_product_comments.php +++ b/install-dev/upgrade/php/update_module_product_comments.php @@ -35,14 +35,14 @@ function update_module_product_comments() `id_customer` int(10) unsigned NOT NULL, `usefulness` tinyint(1) unsigned NOT NULL, PRIMARY KEY (`id_product_comment`, `id_customer`) - ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8'); + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); Db::getInstance()->execute(' CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'product_comment_report` ( `id_product_comment` int(10) unsigned NOT NULL, `id_customer` int(10) unsigned NOT NULL, PRIMARY KEY (`id_product_comment`, `id_customer`) - ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8'); + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); } } diff --git a/install-dev/upgrade/php/update_modules_multishop.php b/install-dev/upgrade/php/update_modules_multishop.php index c5f1a584a..5b5b61c81 100644 --- a/install-dev/upgrade/php/update_modules_multishop.php +++ b/install-dev/upgrade/php/update_modules_multishop.php @@ -9,14 +9,14 @@ function update_modules_multishop() `id_blocklink` int(2) NOT NULL AUTO_INCREMENT, `id_shop` varchar(255) NOT NULL, PRIMARY KEY(`id_blocklink`, `id_shop`)) - ENGINE=MyISAM default CHARSET=utf8'); + ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8'); Db::getInstance()->execute(' CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_shop` ( `id_cms_block` int(10) unsigned NOT NULL auto_increment, `id_shop` int(10) unsigned NOT NULL, PRIMARY KEY (`id_cms_block`, `id_shop`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8'); + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'cms_block_shop (cms_block, id_shop) (SELECT id_cms_block, 1 FROM '._DB_PREFIX_.'cms_block)'); @@ -30,7 +30,7 @@ function update_modules_multishop() `id_blocklink` int(2) NOT NULL AUTO_INCREMENT, `id_shop` varchar(255) NOT NULL, PRIMARY KEY(`id_blocklink`, `id_shop`)) - ENGINE=MyISAM default CHARSET=utf8'); + ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8'); Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'blocklink_shop` (id_blocklink, id_shop) (SELECT id_blocklink, 1 FROM `'._DB_PREFIX_.'blocklink`)'); } diff --git a/install-dev/upgrade/php/update_order_canada.php b/install-dev/upgrade/php/update_order_canada.php index aba4749f8..27e808106 100644 --- a/install-dev/upgrade/php/update_order_canada.php +++ b/install-dev/upgrade/php/update_order_canada.php @@ -38,7 +38,7 @@ function update_order_canada() `tax_name` varchar(40) NOT NULL, `tax_rate` decimal(6,3) NOT NULL, `amount` decimal(20,6) NOT NULL - ) ENGINE=MyISAM DEFAULT CHARSET=utf8'); + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); $address_field = Db::getInstance()->getValue('SELECT value diff --git a/install-dev/upgrade/php/update_stock_mvt_reason.php b/install-dev/upgrade/php/update_stock_mvt_reason.php index 146bc6d20..dc25680d1 100644 --- a/install-dev/upgrade/php/update_stock_mvt_reason.php +++ b/install-dev/upgrade/php/update_stock_mvt_reason.php @@ -24,7 +24,7 @@ function update_stock_mvt_reason() //Recreate new standards movements Db::getInstance()->execute(' - INSERT INTO `PREFIX_stock_mvt_reason` (`id_stock_mvt_reason`, `sign`, `date_add`, `date_upd`) + INSERT INTO `'._DB_PREFIX_.'stock_mvt_reason` (`id_stock_mvt_reason`, `sign`, `date_add`, `date_upd`) VALUES (1, 1, NOW(), NOW()), (2, -1, NOW(), NOW()), @@ -37,7 +37,7 @@ function update_stock_mvt_reason() '); Db::getInstance()->execute(" - INSERT INTO `PREFIX_stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) + INSERT INTO `"._DB_PREFIX_."stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) VALUES (1, 1, 'Increase'), (1, 2, 'Augmenter'), @@ -87,7 +87,7 @@ function update_stock_mvt_reason() foreach ($mvts as $mvt) { Db::getInstance()->execute(' - INSERT INTO `PREFIX_stock_mvt_reason` (`sign`, `date_add`, `date_upd`) + INSERT INTO `'._DB_PREFIX_.'stock_mvt_reason` (`sign`, `date_add`, `date_upd`) VALUES ("'.(int)$mvt['sign'].'", "'.pSQL($mvt['date_add']).'", "'.pSQL($mvt['date_upd']).'") '); @@ -99,7 +99,7 @@ function update_stock_mvt_reason() continue; Db::getInstance()->execute(' - INSERT INTO `PREFIX_stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) + INSERT INTO `'._DB_PREFIX_.'stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) VALUES ("'.(int)$row_id.'", "'.(int)$mvt_lang['id_lang'].'", "'.pSQL($mvt_lang['name']).'") '); } diff --git a/install-dev/upgrade/php/upgrade_cms_15.php b/install-dev/upgrade/php/upgrade_cms_15.php index b276cc162..0f7519efb 100644 --- a/install-dev/upgrade/php/upgrade_cms_15.php +++ b/install-dev/upgrade/php/upgrade_cms_15.php @@ -36,7 +36,7 @@ function upgrade_cms_15() `id_shop` INT( 11 ) UNSIGNED NOT NULL , PRIMARY KEY (`id_cms`, `id_shop`), KEY `id_shop` (`id_shop`) -) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;'); +) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); // /!\ : _cms_shop and _cms are wrong tables name (fixed in 1.5.0.12.sql : upgrade_cms_15_rename() ) $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'_cms_shop` (id_shop, id_cms) diff --git a/install-dev/upgrade/sql/1.5.2.0.sql b/install-dev/upgrade/sql/1.5.2.0.sql index addcd02fb..993ac13b1 100644 --- a/install-dev/upgrade/sql/1.5.2.0.sql +++ b/install-dev/upgrade/sql/1.5.2.0.sql @@ -1,3 +1,5 @@ SET NAMES 'utf8'; -ALTER TABLE `PREFIX_address` CHANGE `company` `company` VARCHAR(32) NULL; \ No newline at end of file +ALTER TABLE `PREFIX_address` CHANGE `company` `company` VARCHAR(32) NULL; + +/* PHP:fix_cms_shop_1520(); */; \ No newline at end of file diff --git a/js/admin-products.js b/js/admin-products.js index d2c76c603..03c07f0a5 100644 --- a/js/admin-products.js +++ b/js/admin-products.js @@ -1584,9 +1584,6 @@ $(document).ready(function() { $("#name_" + id_lang_default + ",#link_rewrite_" + id_lang_default) .live("change", function(e) { - if(typeof e == KeyboardEvent) - if(isArrowKey(e)) - return; $(this).trigger("handleSaveButtons"); }); // bind that custom event diff --git a/modules/blockcart/blockcart.tpl b/modules/blockcart/blockcart.tpl index c3f164470..82ad7ebf6 100644 --- a/modules/blockcart/blockcart.tpl +++ b/modules/blockcart/blockcart.tpl @@ -30,14 +30,17 @@ {if $ajax_allowed} +{/if} + -{/if} +
diff --git a/modules/blocklayered/blocklayered.php b/modules/blocklayered/blocklayered.php index 13cbf260f..606330e6d 100644 --- a/modules/blocklayered/blocklayered.php +++ b/modules/blocklayered/blocklayered.php @@ -1380,14 +1380,14 @@ class BlockLayered extends Module public function hookCategoryDeletion($params) { - $layered_filter_list = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT * FROM '._DB_PREFIX_.'layered_filter'); + $layered_filter_list = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'layered_filter'); foreach ($layered_filter_list as $layered_filter) { - $data = self::unSerialize($layered_filter_list['filters']); + $data = self::unSerialize($layered_filter['filters']); if (in_array((int)$params['category']->id, $data['categories'])) { unset($data['categories'][array_search((int)$params['category']->id, $data['categories'])]); - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'layered_filter` SET `filters` = \''.pSQL(serialize($data)).'\''); + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'layered_filter` SET `filters` = \''.pSQL(serialize($data)).'\' WHERE `id_layered_filter` = '.(int)$layered_filter['id_layered_filter'].''); } } $this->buildLayeredCategories(); @@ -3959,7 +3959,7 @@ class BlockLayered extends Module `filter_show_limit` int(10) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id_layered_category`), KEY `id_category` (`id_category`,`type`) - ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;'); /* MyISAM + latin1 = Smaller/faster */ + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;'); /* MyISAM + latin1 = Smaller/faster */ Db::getInstance()->execute(' CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'layered_filter` ( diff --git a/modules/carriercompare/template/carriercompare.tpl b/modules/carriercompare/template/carriercompare.tpl index 70ecab6d9..0be239dcc 100755 --- a/modules/carriercompare/template/carriercompare.tpl +++ b/modules/carriercompare/template/carriercompare.tpl @@ -35,9 +35,9 @@ var currencyBlank = '{$currencyBlank|intval}'; var id_carrier = '{$id_carrier|intval}'; var id_state = '{$id_state|intval}'; - var SE_RedirectTS = "{l s='Refreshing page and updating cart…' mod='carriercompare'}"; - var SE_RefreshStateTS = "{l s='Checking available states…' mod='carriercompare'}"; - var SE_RetrievingInfoTS = "{l s='Retrieving information…' mod='carriercompare'}"; + var SE_RedirectTS = "{l s='Refreshing page and updating cart...' mod='carriercompare'}"; + var SE_RefreshStateTS = "{l s='Checking available states...' mod='carriercompare'}"; + var SE_RetrievingInfoTS = "{l s='Retrieving information...' mod='carriercompare'}"; var SE_RefreshMethod = {$refresh_method}; var txtFree = "{l s='Free!' mod='carriercompare'}"; @@ -101,7 +101,7 @@

- +

diff --git a/modules/carriercompare/template/configuration.tpl b/modules/carriercompare/template/configuration.tpl index 1614532d9..75a8dd8c5 100644 --- a/modules/carriercompare/template/configuration.tpl +++ b/modules/carriercompare/template/configuration.tpl @@ -1,27 +1,27 @@ {if isset($display_error)} {if $display_error} -
{l s='An error occured during the form validation'}
+
{l s='An error occured during the form validation' mod='carriercompare'}
{else} -
{l s='Configuration updated'}
+
{l s='Configuration updated' mod='carriercompare'}
{/if} {/if}
-
{l s='This module is only available on standard order process because on One Page Checkout the carrier list is already available'}.
- {l s='Global Configuration'} +
{l s='This module is only available on standard order process because on One Page Checkout the carrier list is already available' mod='carriercompare'}.
+ {l s='Global Configuration' mod='carriercompare'}
-

{l s='Set the way to refresh information for a customer'}

+

{l s='Set the way to refresh information for a customer' mod='carriercompare'}

- +
\ No newline at end of file