From 5e2884a8fa12110e2222bf792b3297a14bb652c9 Mon Sep 17 00:00:00 2001 From: fBrignoli Date: Fri, 15 Apr 2011 10:30:56 +0000 Subject: [PATCH] // merge 1.4 (5916) => 1.5.x --- admin-dev/tabs/AdminModules.php | 64 ++++++++++++--- classes/AdminTab.php | 2 +- classes/Module.php | 77 +++++++++++++++++-- classes/Tax.php | 2 - install-dev/controller.js | 11 ++- install-dev/index.php | 47 +++++++++-- install-dev/langs/fr.php | 17 +++- install-dev/php/desactivatecustommodules.php | 71 +++++++++++++++++ install-dev/sql/db_settings_lite.sql | 2 +- install-dev/sql/upgrade/1.4.1.0.sql | 5 ++ install-dev/view.css | 2 +- install-dev/xml/doUpgrade.php | 6 +- mails/de/bankwire.txt | 2 +- mails/de/cheque.txt | 2 +- mails/de/download_product.txt | 2 +- mails/de/in_transit.txt | 2 +- mails/de/log_alert.html | 72 ++++++++--------- mails/de/log_alert.txt | 20 ++--- mails/de/order_canceled.txt | 2 +- mails/de/outofstock.txt | 2 +- mails/de/payment_error.txt | 2 +- mails/de/preparation.txt | 2 +- mails/de/refund.txt | 2 +- mails/de/shipped.txt | 2 +- modules/hipay/hipay.php | 2 +- modules/producttooltip/config.xml | 1 + modules/producttooltip/fr.php | 1 + modules/producttooltip/producttooltip.php | 4 +- modules/trustedshops/es.php | 8 +- modules/trustedshops/it.php | 10 +-- .../order-confirmation-tsbp-classic.tpl | 15 +++- modules/twenga/config.xml | 2 +- modules/twenga/es.php | 4 +- modules/twenga/fr.php | 2 +- modules/twenga/it.php | 8 +- modules/twenga/lib/TwengaAddFeed.php | 45 +++++++++++ modules/twenga/lib/TwengaFields.php | 4 +- modules/twenga/lib/TwengaObj.php | 29 ++++++- modules/twenga/twenga.php | 6 +- themes/prestashop/lang/de.php | 8 +- translations/de/admin.php | 2 +- 41 files changed, 443 insertions(+), 126 deletions(-) create mode 100644 install-dev/php/desactivatecustommodules.php create mode 100755 modules/twenga/lib/TwengaAddFeed.php diff --git a/admin-dev/tabs/AdminModules.php b/admin-dev/tabs/AdminModules.php index bb8abcd74..3ef65cc33 100644 --- a/admin-dev/tabs/AdminModules.php +++ b/admin-dev/tabs/AdminModules.php @@ -60,7 +60,7 @@ class AdminModules extends AdminTab 'i18n_localization' => $this->l('I18n & Localization'), 'merchandizing' => $this->l('Merchandizing'), 'migration_tools' => $this->l('Migration Tools'), 'payments_gateways' => $this->l('Payments & Gateways'), 'payment_security' => $this->l('Payment Security'), 'pricing_promotion' => $this->l('Pricing & Promotion'), 'quick_bulk_update' => $this->l('Quick / Bulk update'), 'search_filter' => $this->l('Search & Filter'), 'seo' => $this->l('SEO'), 'shipping_logistics' => $this->l('Shipping & Logistics'), - 'slideshows' => $this->l('Slideshows'), 'smart_shopping' => $this->l('Smart Shopping'), 'social_networks' => $this->l('Social Networks'), 'others'=> $this->l('Other Modules')); + 'slideshows' => $this->l('Slideshows'), 'smart_shopping' => $this->l('Smart Shopping'), 'market_place' => $this->l('Market Place'), 'social_networks' => $this->l('Social Networks'), 'others'=> $this->l('Other Modules')); $xmlModules = @simplexml_load_file($this->_moduleCacheFile); @@ -80,20 +80,37 @@ class AdminModules extends AdminTab public function postProcess() { global $currentIndex, $cookie; + + $id_employee = (int)($cookie->id_employee); + $filter_conf = Configuration::getMultiple(array( + 'PS_SHOW_TYPE_MODULES_'.$id_employee, + 'PS_SHOW_COUNTRY_MODULES_'.$id_employee, + 'PS_SHOW_INSTALLED_MODULES_'.$id_employee, + 'PS_SHOW_ENABLED_MODULES_'.$id_employee + )); + //reset filtre + if (Tools::isSubmit('desactive') && $filter_conf['PS_SHOW_ENABLED_MODULES_'.$id_employee] != 'enabledDisabled') + $this->setFilterModules($filter_conf['PS_SHOW_TYPE_MODULES_'.$id_employee], $filter_conf['PS_SHOW_COUNTRY_MODULES_'.$id_employee], $filter_conf['PS_SHOW_INSTALLED_MODULES_'.$id_employee], 'disabled'); + if (Tools::isSubmit('active') && $filter_conf['PS_SHOW_ENABLED_MODULES_'.$id_employee] != 'enabledDisabled') + $this->setFilterModules($filter_conf['PS_SHOW_TYPE_MODULES_'.$id_employee], $filter_conf['PS_SHOW_COUNTRY_MODULES_'.$id_employee], $filter_conf['PS_SHOW_INSTALLED_MODULES_'.$id_employee], 'enabled'); + + if (Tools::isSubmit('uninstall') && $filter_conf['PS_SHOW_INSTALLED_MODULES_'.$id_employee] != 'installedUninstalled') + $this->setFilterModules($filter_conf['PS_SHOW_TYPE_MODULES_'.$id_employee], $filter_conf['PS_SHOW_COUNTRY_MODULES_'.$id_employee], 'unistalled', $filter_conf['PS_SHOW_ENABLED_MODULES_'.$id_employee]); + + if (Tools::isSubmit('install') && $filter_conf['PS_SHOW_INSTALLED_MODULES_'.$id_employee] != 'installedUninstalled') + $this->setFilterModules($filter_conf['PS_SHOW_TYPE_MODULES_'.$id_employee], $filter_conf['PS_SHOW_COUNTRY_MODULES_'.$id_employee], 'installed', $filter_conf['PS_SHOW_ENABLED_MODULES_'.$id_employee]); + + if (Tools::isSubmit('filterModules')) { - Configuration::updateValue('PS_SHOW_TYPE_MODULES_'.(int)($cookie->id_employee), Tools::getValue('module_type')); - Configuration::updateValue('PS_SHOW_COUNTRY_MODULES_'.(int)($cookie->id_employee), Tools::getValue('country_module_value')); - Configuration::updateValue('PS_SHOW_INSTALLED_MODULES_'.(int)($cookie->id_employee), Tools::getValue('module_install')); - Configuration::updateValue('PS_SHOW_ENABLED_MODULES_'.(int)($cookie->id_employee), Tools::getValue('module_status')); + $this->setFilterModules(Tools::getValue('module_type'), Tools::getValue('country_module_value'), Tools::getValue('module_install'), Tools::getValue('module_status')); + Tools::redirectAdmin($currentIndex.'&token='.$this->token); } elseif (Tools::isSubmit('resetFilterModules')) { - Configuration::updateValue('PS_SHOW_TYPE_MODULES_'.(int)($cookie->id_employee), 'allModules'); - Configuration::updateValue('PS_SHOW_COUNTRY_MODULES_'.(int)($cookie->id_employee), 0); - Configuration::updateValue('PS_SHOW_INSTALLED_MODULES_'.(int)($cookie->id_employee), 'installedUninstalled'); - Configuration::updateValue('PS_SHOW_ENABLED_MODULES_'.(int)($cookie->id_employee), 'enabledDisabled'); + $this->resetFilterModules(); + Tools::redirectAdmin($currentIndex.'&token='.$this->token); } if (Tools::isSubmit('active')) { @@ -520,16 +537,17 @@ class AdminModules extends AdminTab if (!empty($filterName)) if (stristr($module->name, $filterName) === false AND stristr($module->displayName, $filterName) === false AND stristr($module->description, $filterName) === false) unset($modules[$key]); - + } + + foreach($modules as $module) $autocompleteList .= Tools::jsonEncode(array( 'displayName' => (string)$module->displayName, 'desc' => (string)$module->description, 'name' => (string)$module->name, 'author' => (string)$module->author )).', '; - } - $autocompleteList = rtrim($autocompleteList, ' ,').'];'; + $autocompleteList = rtrim($autocompleteList, ' ,').'];'; // Display CSS Fancy Box echo ''; echo ''; @@ -661,6 +679,7 @@ class AdminModules extends AdminTab $goto = 'others'; else $goto = false; + echo '