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()