diff options
author | Andreas Gohr <andi@splitbrain.org> | 2011-11-12 11:54:51 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2011-11-12 11:54:51 +0100 |
commit | 54f3075553a782ff5e32a5326f0e225f4437be29 (patch) | |
tree | ac3294bb87da0e8c2ede7851cd3e146927db826c | |
parent | 28d2ad801d5eafcfdfc9a122966458b2689a7ec6 (diff) | |
download | rpg-54f3075553a782ff5e32a5326f0e225f4437be29.tar.gz rpg-54f3075553a782ff5e32a5326f0e225f4437be29.tar.bz2 |
mail prefix defaults to title when empty
-rw-r--r-- | inc/Mailer.class.php | 12 |
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 |