From facff86757fb91fc2fdbbb5863eabfd31d571b2c Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Mon, 1 Oct 2012 08:20:36 +0000 Subject: [PATCH] [-] BO : fixed bug #PSCFV-4555 --- controllers/admin/AdminModulesController.php | 2 +- modules/cheque/cheque.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index 7cc18254d..562c42e54 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -1018,7 +1018,7 @@ class AdminModulesControllerCore extends AdminController $this->makeModulesStats($module); // Assign warnings - if (isset($module->warning) && !empty($module->warning)) + if ($module->active && isset($module->warning) && !empty($module->warning)) $this->warnings[] = sprintf($this->l('%1$s: %2$s'), $module->displayName, $module->warning); // AutoComplete array diff --git a/modules/cheque/cheque.php b/modules/cheque/cheque.php index bd06420c1..0dfe1f410 100644 --- a/modules/cheque/cheque.php +++ b/modules/cheque/cheque.php @@ -59,9 +59,9 @@ class Cheque extends PaymentModule $this->description = $this->l('Module for accepting payments by check.'); $this->confirmUninstall = $this->l('Are you sure you want to delete your details ?'); - if ($this->active && (!isset($this->chequeName) || !isset($this->address) || empty($this->chequeName) || empty($this->address))) + if ((!isset($this->chequeName) || !isset($this->address) || empty($this->chequeName) || empty($this->address))) $this->warning = $this->l('\'To the order of\' and address must be configured in order to use this module correctly.'); - if ($this->active && !count(Currency::checkPaymentCurrencies($this->id))) + if (!count(Currency::checkPaymentCurrencies($this->id))) $this->warning = $this->l('No currency set for this module'); $this->extra_mail_vars = array(