From f6a3c098258a1380127beb69b2ac18eebb70f4ec Mon Sep 17 00:00:00 2001 From: lLefevre Date: Wed, 4 Jan 2012 17:06:46 +0000 Subject: [PATCH] [-] BO : fix #PSFV-203 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12157 b9a71923-0436-4b27-9f14-aed3839534dd --- modules/blockcontact/blockcontact.php | 12 +++++++----- modules/blockcontactinfos/blockcontactinfos.php | 9 +++++---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/modules/blockcontact/blockcontact.php b/modules/blockcontact/blockcontact.php index 99e32b710..4eb8b3eb7 100644 --- a/modules/blockcontact/blockcontact.php +++ b/modules/blockcontact/blockcontact.php @@ -55,15 +55,16 @@ class blockcontact extends Module public function getContent() { + $html = ''; // If we try to update the settings if (isset($_POST['submitModule'])) { Configuration::updateValue('blockcontact_telnumber', (preg_match('/^[0-9]+/', $_POST['telnumber']) ? $_POST['telnumber']: '')); Configuration::updateValue('blockcontact_email', (($_POST['email'] != '') ? $_POST['email']: '')); - echo '
'.$this->l('Configuration updated').'
'; + $html .= '
'.$this->l('Configuration updated').'
'; } - - return ' + + $html .= '

'.$this->displayName.'

@@ -77,8 +78,9 @@ class blockcontact extends Module
-
- '; + '; + + return $html; } public function hookDisplayHeader() diff --git a/modules/blockcontactinfos/blockcontactinfos.php b/modules/blockcontactinfos/blockcontactinfos.php index ad7ab806d..9b80748c1 100644 --- a/modules/blockcontactinfos/blockcontactinfos.php +++ b/modules/blockcontactinfos/blockcontactinfos.php @@ -64,6 +64,7 @@ class blockcontactinfos extends Module public function getContent() { + $html = ''; // If we try to update the settings if (isset($_POST['submitModule'])) { @@ -72,10 +73,10 @@ class blockcontactinfos extends Module Configuration::updateValue('blockcontactinfos_phone', ((isset($_POST['phone']) AND $_POST['phone'] != '') ? $_POST['phone'] : '')); Configuration::updateValue('blockcontactinfos_email', ((isset($_POST['email']) AND $_POST['email'] != '') ? $_POST['email'] : Configuration::get('PS_SHOP_EMAIL'))); - echo '
'.$this->l('Configuration updated').'
'; + $html .= '
'.$this->l('Configuration updated').'
'; } - - $content = ' + + $html .= '

'.$this->displayName.'

@@ -94,7 +95,7 @@ class blockcontactinfos extends Module '; - return $content; + return $html; } public function hookHeader()