summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-11-12 11:54:51 +0100
committerAndreas Gohr <andi@splitbrain.org>2011-11-12 11:54:51 +0100
commit54f3075553a782ff5e32a5326f0e225f4437be29 (patch)
treeac3294bb87da0e8c2ede7851cd3e146927db826c /inc
parent28d2ad801d5eafcfdfc9a122966458b2689a7ec6 (diff)
downloadrpg-54f3075553a782ff5e32a5326f0e225f4437be29.tar.gz
rpg-54f3075553a782ff5e32a5326f0e225f4437be29.tar.bz2
mail prefix defaults to title when empty
Diffstat (limited to 'inc')
-rw-r--r--inc/Mailer.class.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php
index 3b7762e77..7b09cf75e 100644
--- a/inc/Mailer.class.php
+++ b/inc/Mailer.class.php
@@ -393,12 +393,14 @@ class Mailer {
if(isset($subject)){
// add prefix to subject
- if($conf['mailprefix']){
+ if(empty($conf['mailprefix'])){
+ $prefix = '['.$conf['title'].']';
+ }else{
$prefix = '['.$conf['mailprefix'].']';
- $len = strlen($prefix);
- if(substr($this->headers['subject'],0,$len) != $prefix){
- $this->headers['subject'] = $prefix.' '.$this->headers['subject'];
- }
+ }
+ $len = strlen($prefix);
+ if(substr($this->headers['subject'],0,$len) != $prefix){
+ $this->headers['subject'] = $prefix.' '.$this->headers['subject'];
}
// encode subject