From 67c108ddd39ee486eaf8d84443fc2ba6c157a2d4 Mon Sep 17 00:00:00 2001 From: vChabot Date: Wed, 9 May 2012 08:29:07 +0000 Subject: [PATCH] // delete confirm message when updating module configuration --- modules/bankwire/bankwire.php | 2 +- modules/blockcart/blockcart.php | 2 +- modules/blockcategories/blockcategories.php | 2 +- modules/blockcustomerprivacy/blockcustomerprivacy.php | 4 +++- modules/blocknewproducts/blocknewproducts.php | 2 +- modules/blockreinsurance/blockreinsurance.php | 7 +++++-- modules/blocksocial/blocksocial.php | 4 +++- modules/blockwishlist/blockwishlist.php | 2 +- modules/cheque/cheque.php | 2 +- modules/pagesnotfound/pagesnotfound.php | 6 +++--- modules/productcomments/productcomments.php | 8 ++++---- modules/statscheckup/statscheckup.php | 4 ++-- modules/watermark/config.xml | 6 +++--- 13 files changed, 29 insertions(+), 22 deletions(-) diff --git a/modules/bankwire/bankwire.php b/modules/bankwire/bankwire.php index ef7549eef..8e6e6a810 100644 --- a/modules/bankwire/bankwire.php +++ b/modules/bankwire/bankwire.php @@ -102,7 +102,7 @@ class BankWire extends PaymentModule Configuration::updateValue('BANK_WIRE_OWNER', Tools::getValue('owner')); Configuration::updateValue('BANK_WIRE_ADDRESS', Tools::getValue('address')); } - $this->_html .= '
'.$this->l('ok').' '.$this->l('Settings updated').'
'; + $this->_html .= '
'.$this->l('Settings updated').'
'; } private function _displayBankWire() diff --git a/modules/blockcart/blockcart.php b/modules/blockcart/blockcart.php index 0707fcdaf..2009db1b8 100644 --- a/modules/blockcart/blockcart.php +++ b/modules/blockcart/blockcart.php @@ -136,7 +136,7 @@ class BlockCart extends Module $output .= '
'.$this->l('Ajax : Invalid choice.').'
'; else Configuration::updateValue('PS_BLOCK_CART_AJAX', (int)($ajax)); - $output .= '
'.$this->l('Confirmation').''.$this->l('Settings updated').'
'; + $output .= '
'.$this->l('Settings updated').'
'; } return $output.$this->displayForm(); } diff --git a/modules/blockcategories/blockcategories.php b/modules/blockcategories/blockcategories.php index 649f84a02..9b11ead03 100644 --- a/modules/blockcategories/blockcategories.php +++ b/modules/blockcategories/blockcategories.php @@ -89,7 +89,7 @@ class BlockCategories extends Module Configuration::updateValue('BLOCK_CATEG_SORT', Tools::getValue('BLOCK_CATEG_SORT')); $this->_clearBlockcategoriesCache(); - $output .= '
'.$this->l('Confirmation').''.$this->l('Settings updated').'
'; + $output .= '
'.$this->l('Settings updated').'
'; } } return $output.$this->displayForm(); diff --git a/modules/blockcustomerprivacy/blockcustomerprivacy.php b/modules/blockcustomerprivacy/blockcustomerprivacy.php index e62d1be2b..f44bad208 100644 --- a/modules/blockcustomerprivacy/blockcustomerprivacy.php +++ b/modules/blockcustomerprivacy/blockcustomerprivacy.php @@ -58,6 +58,7 @@ class Blockcustomerprivacy extends Module $languages = Language::getLanguages(false); $iso = $this->context->language->iso_code; + $output = ''; if (Tools::isSubmit('submitCustPrivMess')) { $message_trads = array(); @@ -68,7 +69,7 @@ class Blockcustomerprivacy extends Module $message_trads[(int)$id_lang[1]] = $value; } Configuration::updateValue('CUSTPRIV_MESSAGE', $message_trads, true); - echo '
'.$this->l('Configuration updated').'
'; + $output = '
'.$this->l('Configuration updated').'
'; } $content = ''; @@ -118,6 +119,7 @@ class Blockcustomerprivacy extends Module } $values = Configuration::getInt('CUSTPRIV_MESSAGE'); + $content .= $output; $content .= '
'.$this->displayName.'
diff --git a/modules/blocknewproducts/blocknewproducts.php b/modules/blocknewproducts/blocknewproducts.php index 1d09f3658..c5011bb6a 100644 --- a/modules/blocknewproducts/blocknewproducts.php +++ b/modules/blocknewproducts/blocknewproducts.php @@ -64,7 +64,7 @@ class BlockNewProducts extends Module { Configuration::updateValue('PS_BLOCK_NEWPRODUCTS_DISPLAY', (int)(Tools::getValue('always_display'))); Configuration::updateValue('NEW_PRODUCTS_NBR', (int)($productNbr)); - $output .= '
'.$this->l('Confirmation').''.$this->l('Settings updated').'
'; + $output .= '
'.$this->l('Settings updated').'
'; } } return $output.$this->displayForm(); diff --git a/modules/blockreinsurance/blockreinsurance.php b/modules/blockreinsurance/blockreinsurance.php index 7e5c0bc71..1b3f1afb9 100644 --- a/modules/blockreinsurance/blockreinsurance.php +++ b/modules/blockreinsurance/blockreinsurance.php @@ -57,6 +57,7 @@ class Blockreinsurance extends Module return Db::getInstance()->execute(' CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'reinsurance` ( `id_contactinfos` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL , `filename` VARCHAR(100) NOT NULL, `text` VARCHAR(300) NOT NULL, PRIMARY KEY (`id_contactinfos`) @@ -123,13 +124,14 @@ class Blockreinsurance extends Module public function getContent() { // If we try to update the settings + $output = ''; if (isset($_POST['submitModule'])) { Configuration::updateValue('blockreinsurance_nbblocks', ((isset($_POST['nbblocks']) && $_POST['nbblocks'] != '') ? (int)$_POST['nbblocks'] : '')); if ($this->removeFromDB() && $this->addToDB()) - echo '
'.$this->l('Configuration updated').'
'; + $output = '
'.$this->l('Configuration updated').'
'; else - echo '
'.$this->l('An error occurred during the save').'
'; + $output = '
'.$this->l('An error occurred during the save').'
'; } $nb_blocks = Configuration::get('blockreinsurance_nbblocks'); @@ -161,6 +163,7 @@ class Blockreinsurance extends Module });

'.$this->displayName.'

+ '.$output.'