From bf6084e8b554a13a2b227225b4dec46646f8419f Mon Sep 17 00:00:00 2001 From: rMalie Date: Wed, 29 Feb 2012 12:41:05 +0000 Subject: [PATCH] // Remove AdminPdf controller and move its configuration in AdminInvoices controller git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13735 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminInvoicesController.php | 13 ++- controllers/admin/AdminPdfController.php | 89 ------------------- install-dev/data/xml/tab.xml | 3 - install-dev/langs/de/data/tab.xml | 1 - install-dev/langs/en/data/tab.xml | 1 - install-dev/langs/es/data/tab.xml | 1 - install-dev/langs/fr/data/tab.xml | 1 - install-dev/langs/it/data/tab.xml | 1 - translations/fr/admin.php | 14 ++- 9 files changed, 21 insertions(+), 103 deletions(-) delete mode 100644 controllers/admin/AdminPdfController.php diff --git a/controllers/admin/AdminInvoicesController.php b/controllers/admin/AdminInvoicesController.php index b66148410..e1b54c8de 100644 --- a/controllers/admin/AdminInvoicesController.php +++ b/controllers/admin/AdminInvoicesController.php @@ -31,6 +31,8 @@ class AdminInvoicesControllerCore extends AdminController { $this->table = 'invoice'; + parent::__construct(); + $this->options = array( 'general' => array( 'title' => $this->l('Invoice options'), @@ -68,13 +70,18 @@ class AdminInvoicesControllerCore extends AdminController 'type' => 'select', 'identifier' => 'value', 'list' => $this->getInvoicesModels() + ), + 'PS_PDF_USE_CACHE' => array( + 'title' => $this->l('Use disk as cache for PDF invoices'), + 'desc' => $this->l('Save memory but slow down the rendering process.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' ) ), 'submit' => array() - ), + ) ); - - parent::__construct(); } public function initFormByDate() diff --git a/controllers/admin/AdminPdfController.php b/controllers/admin/AdminPdfController.php deleted file mode 100644 index ca4fcdffd..000000000 --- a/controllers/admin/AdminPdfController.php +++ /dev/null @@ -1,89 +0,0 @@ - -* @copyright 2007-2012 PrestaShop SA -* @version Release: $Revision: 7465 $ -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -class AdminPdfControllerCore extends AdminController -{ - private $encoding_list = array(); - - private $font_list = array(); - - public function __construct() - { - $this->className = 'Configuration'; - $this->table = 'configuration'; - $this->lang = true; - $this->context = Context::getContext(); - - /* Collect all encoding map files and build array for combo box */ - $encoding_files = scandir(_PS_FPDF_PATH_.'font/makefont'); - $arr = array(); - - foreach ($encoding_files as $file) - if (substr($file, -4) == '.map') - { - $arr['mode'] = substr($file, 0, -4); - $arr['name'] = substr($file, 0, -4); - array_push($this->encoding_list, $arr); - } - - /* Collect all font files and build array for combo box */ - $font_files = scandir(_PS_FPDF_PATH_.'font'); - $arr = array(); - - foreach ($font_files as $file) - if (substr($file, -4) == '.php' && - $file != 'index.php' && - substr($file, -6) != 'bi.php' && - substr($file, -5) != 'b.php' && - substr($file, -5) != 'i.php') - { - $arr['mode'] = substr($file, 0, -4); - $arr['name'] = substr($file, 0, -4); - array_push($this->font_list, $arr); - } - - $this->options = array( - 'PDF' => array( - 'title' => $this->l('PDF settings for the current language:').' '.$this->context->language->name, - 'icon' => 'pdf', - 'class' => 'width2', - 'fields' => array( - 'PS_PDF_USE_CACHE' => array( - 'title' => $this->l('Use disk as cache'), - 'desc' => $this->l('Save memory but slow down the rendering process.'), - 'validation' => 'isBool', - 'cast' => 'intval', - 'type' => 'bool' - ) - ), - 'submit' => array() - ) - ); - - parent::__construct(); - } -} diff --git a/install-dev/data/xml/tab.xml b/install-dev/data/xml/tab.xml index 324d262b9..04fa3433b 100644 --- a/install-dev/data/xml/tab.xml +++ b/install-dev/data/xml/tab.xml @@ -129,9 +129,6 @@ AdminOrderMessage - - AdminPdf - AdminCurrencies diff --git a/install-dev/langs/de/data/tab.xml b/install-dev/langs/de/data/tab.xml index d87f06dbc..597185265 100644 --- a/install-dev/langs/de/data/tab.xml +++ b/install-dev/langs/de/data/tab.xml @@ -41,7 +41,6 @@ - diff --git a/install-dev/langs/en/data/tab.xml b/install-dev/langs/en/data/tab.xml index abccbfd60..9f9aaf6fc 100644 --- a/install-dev/langs/en/data/tab.xml +++ b/install-dev/langs/en/data/tab.xml @@ -41,7 +41,6 @@ - diff --git a/install-dev/langs/es/data/tab.xml b/install-dev/langs/es/data/tab.xml index a7f442ba8..9df62385e 100644 --- a/install-dev/langs/es/data/tab.xml +++ b/install-dev/langs/es/data/tab.xml @@ -41,7 +41,6 @@ - diff --git a/install-dev/langs/fr/data/tab.xml b/install-dev/langs/fr/data/tab.xml index aff7da1ee..4b5ade650 100644 --- a/install-dev/langs/fr/data/tab.xml +++ b/install-dev/langs/fr/data/tab.xml @@ -41,7 +41,6 @@ - diff --git a/install-dev/langs/it/data/tab.xml b/install-dev/langs/it/data/tab.xml index 63a797044..102f2f688 100644 --- a/install-dev/langs/it/data/tab.xml +++ b/install-dev/langs/it/data/tab.xml @@ -41,7 +41,6 @@ - diff --git a/translations/fr/admin.php b/translations/fr/admin.php index b67c3e5fc..be4e3f4c3 100644 --- a/translations/fr/admin.php +++ b/translations/fr/admin.php @@ -1115,6 +1115,7 @@ $_LANGADM['AdminGenerator3c108dd1d7338dcc6a9face1824db1dd'] = 'Générer le fich $_LANGADM['AdminGenerator3f3e336e2f1fa10375efd923fca18b55'] = 'Avertissement :'; $_LANGADM['AdminGenerator53bdd80ab93282cc38ef9c605f058eba'] = 'Cet outil va automatiquement générer le fichier .htaccess, offrant la possibilité de procéder à la réécriture d\'URL de la boutique et de personnaliser les erreurs 404.'; $_LANGADM['AdminGenerator5b1315f64379c20167cc186f3cfed249'] = 'fichier .htaccess !'; +$_LANGADM['AdminGenerator6049980ef775b17f7f0b3624ae121733'] = 'L\'URL rewriting (mod_rewrite) n\'est pas activé sur votre serveur. Si vous voulez utiliser les URL simplifiées, veuillez activer ce module Apache.'; $_LANGADM['AdminGenerator60e4943ad37920b1f95133fae1420b59'] = ' - lui donner les permissions (CHMOD 666 sur les systèmes Unix)'; $_LANGADM['AdminGenerator620da2256fdfaa8c903cc870221450ca'] = 'cet outil peut SEULEMENT être utilisé si vous êtes hébergé par un serveur web Apache. Renseignez-vous auprès de votre hébergeur.'; $_LANGADM['AdminGenerator76bdc7d3324595e5c6430ba466690cba'] = 'fichier robots.txt !'; @@ -1596,6 +1597,7 @@ $_LANGADM['AdminInformationf906d7a3367c3baec220f5f8e51b54ee'] = 'Aucun changemen $_LANGADM['AdminInformationfaf165f191e0bbd2c13864a08ee9aa83'] = 'Nom du thème utilisé'; $_LANGADM['AdminInformationfc0eeb8415aed39a9d3624c7fc2fe47c'] = 'Module PageSpeed pour Apache installé (mod_instaweb)'; $_LANGADM['AdminInformationfff9270dd072343e948e4e53a4966c80'] = 'Vérification des fichiers ...'; +$_LANGADM['AdminInvoices0092e1e74b5d85c19310a79c07fd4e96'] = 'Utiliser le cache disque pour les factures PDF'; $_LANGADM['AdminInvoices0b1fb1278454d848f968d419e29c253b'] = 'Format : 2007-12-31 (inclus)'; $_LANGADM['AdminInvoices0df35f41ce9f64e7f14819bd4145a2be'] = 'Préfixe utilisé pour la numérotation des factures'; $_LANGADM['AdminInvoices1513c8f4f5c2d340ac3e1c3d09aeff4c'] = 'Texte libre :'; @@ -1609,6 +1611,7 @@ $_LANGADM['AdminInvoices33caa076f23f453dd4061726f3706325'] = 'Jusqu\'au :'; $_LANGADM['AdminInvoices366a2e6043b7f22bbb12df4a5fce45fb'] = 'Aucune facture trouvée pour cette période'; $_LANGADM['AdminInvoices38b1cc080b5571823889c6f775bf6606'] = 'Numéro de facture invalide (il doit être supérieur à '; $_LANGADM['AdminInvoices3ae56a835894e53600833725244b578f'] = 'Activer les factures :'; +$_LANGADM['AdminInvoices4547c92e3493ab518fc274b8be9427c3'] = 'Economise de la mémoire mais ralenti la vitesse de génération des factures.'; $_LANGADM['AdminInvoices647ad0242a9d796e3c83ecf6d6435bc2'] = 'Format : 2008-12-31 (inclus)'; $_LANGADM['AdminInvoices77ba9aa9a87226e82948295b25b9bc6c'] = 'Vous pouvez aussi exporter les commandes qui n\'ont pas encore été payées'; $_LANGADM['AdminInvoices832d6a06e91e49828a89fb1ca4651d37'] = 'Préfixe :'; @@ -1816,17 +1819,21 @@ $_LANGADM['AdminMeta394deec8b4e901394f69ad41095b1ecc'] = 'Méta mots-clés :'; $_LANGADM['AdminMeta44bc5350d0a72d6f348aaeebb4004d8e'] = 'Rediriger automatiquement vers l\'URL canonique'; $_LANGADM['AdminMeta4b9a9672a96a435f1d15ad934e093104'] = 'Route vers les modules'; $_LANGADM['AdminMeta5575f8bf467eba7499f22e78db6f3f56'] = 'Route vers les produits'; +$_LANGADM['AdminMeta6049980ef775b17f7f0b3624ae121733'] = 'L\'URL rewriting (mod_rewrite) n\'est pas activé sur votre serveur. Si vous voulez utiliser les URL simplifiées, veuillez activer ce module Apache.'; $_LANGADM['AdminMeta6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Caractères non valables :'; $_LANGADM['AdminMeta82fa9d45784fa48b4a37f4e225de5451'] = 'Une courte description'; $_LANGADM['AdminMeta83495f05c4aa5f326f23b6d58d0da5e6'] = 'Route vers les catégories CMS'; $_LANGADM['AdminMeta8eee2883d683841b6ab08c1bb6d13fb7'] = 'Route vers les pages CMS'; $_LANGADM['AdminMeta8f815100fbc9398e9441b28d219e0ca4'] = 'Route vers les marques'; +$_LANGADM['AdminMeta93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; $_LANGADM['AdminMeta9ca94e67feafa7c087ed70257d54ce53'] = 'Mots-clés : %s'; $_LANGADM['AdminMetaa6bb76858f8b4b61c050ad7a7ac57e06'] = 'Méta description :'; $_LANGADM['AdminMetab718adec73e04ce3ec720dd11a06a308'] = 'ID'; $_LANGADM['AdminMetab78a3223503896721cca1303f776159b'] = 'Titre'; +$_LANGADM['AdminMetabafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; $_LANGADM['AdminMetabc5d446bc10f94f2132fa898d11a423a'] = 'Configuration des URL'; $_LANGADM['AdminMetac12e753c3108c17350db4e5990ff626e'] = 'Liste des mots-clés'; +$_LANGADM['AdminMetac9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; $_LANGADM['AdminMetad3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection'; $_LANGADM['AdminMetad65773e40ecde8c2b27057f09fc868ff'] = 'Titre de la page :'; $_LANGADM['AdminMetada82a2002384409477655085d5c4136e'] = 'N\'activez cette option que si votre serveur autorise la réécriture d\'URL (recommandé).'; @@ -2075,6 +2082,7 @@ $_LANGADM['AdminOrders71e2851d86b252a44c658b896c486921'] = 'Modifier une note'; $_LANGADM['AdminOrders729a51874fe901b092899e9e8b31c97a'] = 'Êtes-vous sûr ?'; $_LANGADM['AdminOrders73af90a8372beea9f81a3c3ca77a4aa8'] = 'Envoyer un e-mail au client contenant le lien pour effectuer le paiement.'; $_LANGADM['AdminOrders73bd682c8a8613f6c009f1b802dc2cef'] = 'Privé :'; +$_LANGADM['AdminOrders7442e29d7d53e549b78d93c46b8cdcfc'] = 'Commandes'; $_LANGADM['AdminOrders74c06eb18eeb118d7b3c623d0c717290'] = 'Rembourser les produits'; $_LANGADM['AdminOrders76f0ed934de85cc7131910b32ede7714'] = 'Rembourser'; $_LANGADM['AdminOrders77295c7d814e7397c55f64ec06313984'] = 'Devise :'; @@ -2155,12 +2163,14 @@ $_LANGADM['AdminOrdersce06c769dac054ae0bed803d833f3f1c'] = 'Avoir concernant la $_LANGADM['AdminOrdersce26601dac0dea138b7295f02b7620a7'] = 'Client'; $_LANGADM['AdminOrdersd1228f5476d15142b1358ae4b5fa2454'] = 'Commande n°'; $_LANGADM['AdminOrdersd3791adb95b19897037a0e3153ff6356'] = 'Réinitialiser le prix du transporteur'; +$_LANGADM['AdminOrdersd460ec1b52f16b50d55978c3d4bfdc97'] = '< Précédent'; $_LANGADM['AdminOrdersd5bd22327f46800fbd839c6fae3eaa49'] = 'Si vous décidez de créer cette remise pour toutes les factures, une remise sera créée par commande et leurs factures.'; $_LANGADM['AdminOrdersd75006dcef2bef28163a45d12d3f27ee'] = 'Procéder à un remboursement'; $_LANGADM['AdminOrdersd98a07f84921b24ee30f86fd8cd85c3c'] = 'de'; $_LANGADM['AdminOrdersdc5f499e83aef4f6811faa4081631740'] = 'Le'; $_LANGADM['AdminOrdersdc8d1b4e8c9bdf1eed97eb9ed5877a43'] = 'Souhaitez-vous écraser le message actuel ?'; $_LANGADM['AdminOrdersdd70925db57b570bcb660d68c30d5e0b'] = 'Réf. fournisseur :'; +$_LANGADM['AdminOrdersdd9644efbcf9d41c5be6daed03514dd8'] = 'Suivant >'; $_LANGADM['AdminOrdersddd167afc1441dcab03a9546c8ef8b51'] = 'Voir le bon de livraison'; $_LANGADM['AdminOrdersdeb10517653c255364175796ace3553f'] = 'Produit'; $_LANGADM['AdminOrderse06d7593c1cd6dabef450be6c3da7091'] = 'Retours produit'; @@ -2270,9 +2280,6 @@ $_LANGADM['AdminPaymentdba25e6675be5fa38a43f015fd6f91d4'] = 'Paiement'; $_LANGADM['AdminPaymentdba77f97d76421a973d8e4903ec1b056'] = 'Restrictions des modules de paiement'; $_LANGADM['AdminPaymente39a06ebd5bb473161c5dff3c79c80a5'] = 'Enregistrer les restrictions'; $_LANGADM['AdminPaymentfa8d45faf5026180b0506317cab3a421'] = 'Pour chaque module, veuillez cocher le ou les pays à activer.'; -$_LANGADM['AdminPdf125902509918b45d53071e760d5c97c1'] = 'Utiliser le disque dur pour le cache'; -$_LANGADM['AdminPdf4547c92e3493ab518fc274b8be9427c3'] = 'Économise la mémoire mais ralentit l\'affichage de la page.'; -$_LANGADM['AdminPdf788ebe0fc7fc09c0c20069659af8e139'] = 'Configuration des PDF dans la langue courante :'; $_LANGADM['AdminPerformance00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; $_LANGADM['AdminPerformance029c7c02d736e799563e65ab25824886'] = 'Serveur de média n°2 :'; $_LANGADM['AdminPerformance02d56cf7754ce16d7ce0193fbca7c90a'] = 'Cache'; @@ -3233,6 +3240,7 @@ $_LANGADM['AdminShop821b8ee6937cec96c30fdafbfe836d68'] = 'Magasins'; $_LANGADM['AdminShop8409f0f4c1b13db73d10a0f148b67dda'] = 'Importer les informations de la boutique'; $_LANGADM['AdminShop89b58c514d07acaa086ca02b57512dcb'] = 'Points d\'accroches des modules'; $_LANGADM['AdminShop92318dc9b42eb05bb1c958f0a15d19b9'] = 'Langues'; +$_LANGADM['AdminShop9354dfca82fa90c0171693a247764994'] = 'Stock des produits'; $_LANGADM['AdminShop99104e1966b34f0320d33c5892946a82'] = 'Importer les informations associées (produits, etc.) depuis une autre boutique'; $_LANGADM['AdminShop9d5bf15117441a1b52eb1f0808e4aad3'] = 'Réductions'; $_LANGADM['AdminShop9e43e210cf7bd16b8896636cae3e46b8'] = 'Restrictions des devises pour le module de paiement';