diff options
author | Arun Persaud <arun@nubati.net> | 2013-01-14 18:35:59 -0800 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2013-01-14 18:35:59 -0800 |
commit | d170223b2c1d92771a6bb6dcd2eac07bb2ad777c (patch) | |
tree | 2eb3dbed7a3aefb97a81b48123a880314f299949 /include/functions.php | |
parent | 0336b5b95349ba50004217c385a5f15a5421fece (diff) | |
download | e-DoKo-d170223b2c1d92771a6bb6dcd2eac07bb2ad777c.tar.gz e-DoKo-d170223b2c1d92771a6bb6dcd2eac07bb2ad777c.tar.bz2 e-DoKo-d170223b2c1d92771a6bb6dcd2eac07bb2ad777c.zip |
BUGIFX: added some set_language functions, fixed some strings for translation, fixed typo
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/functions.php b/include/functions.php index 31f918c..d7ff065 100644 --- a/include/functions.php +++ b/include/functions.php @@ -122,11 +122,8 @@ function mymail($uid,$gameid=0,$type,$message) /* do we send the email right away or save it in the database? */ $send_now = 1; - $name = DB_get_name('userid',$user); - $header = sprintf(_('Hello %s'),$name); - $header .= "\n\n"; - - $To = DB_get_email('userid',$user); + $name = DB_get_name('userid',$user); + $To = DB_get_email('userid',$user); /* check if user wants email right away or if we should save it in * the database for later delivery @@ -138,6 +135,9 @@ function mymail($uid,$gameid=0,$type,$message) /* use local language */ set_language($uidPREF['language']); + $header = sprintf(_('Hello %s'),$name); + $header .= "\n\n"; + /* add standard header and footer */ $subject = "$EmailName "; if($gameid) @@ -185,7 +185,7 @@ function mymail($uid,$gameid=0,$type,$message) } /* standard goodbye */ - $footer = "\n"._("Have a nice day\n your E-Doko service department"). + $footer = "\n"._('Have a nice day')."\n "._('your E-Doko service department'). "\n\n". "-- \n". _('You can change your mail delivery mode in the preference menu.'). @@ -201,6 +201,7 @@ function mymail($uid,$gameid=0,$type,$message) DB_digest_insert_email($To,$message,$type,$gameid); } } + /* reset language to original user*/ set_language($PREF['language']); |