diff --git a/classes/Mail.php b/classes/Mail.php index 0f96954b7..6483afabd 100644 --- a/classes/Mail.php +++ b/classes/Mail.php @@ -296,8 +296,8 @@ class MailCore extends ObjectModel } /* Create mail and attach differents parts */ - if (Configuration::get('SHOP_AS_SUBJECT_PREFIX')) { - $subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject; + if (Configuration::get('PS_MAIL_SUBJECT_PREFIX')) { + $subject = '[' . strip_tags($configuration['PS_SHOP_NAME']) . '] ' . $subject; } $message->setSubject($subject); diff --git a/controllers/admin/AdminEmailsController.php b/controllers/admin/AdminEmailsController.php index 58b60b3ec..ccda545e2 100644 --- a/controllers/admin/AdminEmailsController.php +++ b/controllers/admin/AdminEmailsController.php @@ -109,6 +109,12 @@ class AdminEmailsControllerCore extends AdminController 2 => $this->l('Set my own SMTP parameters (for advanced users ONLY)') ) ), + 'PS_MAIL_SUBJECT_PREFIX' => array( + 'title' => $this->l('Enable the store name as a prefix in the email\'s subject'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + ), 'PS_MAIL_TYPE' => array( 'title' => '', 'validation' => 'isGenericName', @@ -125,14 +131,7 @@ class AdminEmailsControllerCore extends AdminController 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool' - ), - 'SHOP_AS_SUBJECT_PREFIX' => array( - 'title' => $this->l('Add Website name to email subject'), - 'validation' => 'isBool', - 'cast' => 'intval', - 'type' => 'bool', - 'desc' => $this->l('Enable to prefix email subjects with the Website name') - ), + ) ), 'submit' => array('title' => $this->l('Save')) ), diff --git a/install/data/xml/configuration.xml b/install/data/xml/configuration.xml index 490e2b691..9376c3c5c 100644 --- a/install/data/xml/configuration.xml +++ b/install/data/xml/configuration.xml @@ -785,6 +785,9 @@ 1 + + 1 + Animaux