aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_mail.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-10-08 23:46:09 +0000
committerrvelices <rv-github@modusoptimus.com>2007-10-08 23:46:09 +0000
commit98b07a4a7fa1baff52800f70066f311768904430 (patch)
tree4bc89e8017f5fced16a6de6d4c8b37639caccff8 /include/functions_mail.inc.php
parent5132cc1f87025bd17d6bd90e5ac8ad73288bf482 (diff)
- some code refactoring before upgrade to utf (only cosmetic at this point...)
git-svn-id: http://piwigo.org/svn/trunk@2126 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_mail.inc.php')
-rw-r--r--include/functions_mail.inc.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index a20a32797..a0e3110ae 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -48,7 +48,7 @@ function encode_mime_header($str)
$str = str_replace(" ", "_", $str);
global $lang_info;
- return '=?'.$lang_info['charset'].'?Q?'.$str.'?=';
+ return '=?'.get_pwg_charset().'?Q?'.$str.'?=';
}
/*
@@ -226,12 +226,12 @@ function switch_lang_to($language)
$lang = array();
// language files
- include(get_language_filepath('common.lang.php', '', $language));
+ load_language('common.lang', '', $language);
// No test admin because script is checked admin (user selected no)
// Translations are in admin file too
- include(get_language_filepath('admin.lang.php', '', $language));
+ load_language('admin.lang', '', $language);
trigger_action('loading_lang');
- @include(get_language_filepath('local.lang.php', '', $language));
+ load_language('local.lang', '', $language);
$switch_lang[$language]['lang_info'] = $lang_info;
$switch_lang[$language]['lang'] = $lang;
@@ -588,7 +588,7 @@ function pwg_mail($to, $args = array())
$content = '';
- if (!isset($conf_mail[$args['email_format']][$lang_info['charset']][$args['template']][$args['theme']]))
+ if (!isset($conf_mail[$args['email_format']][get_pwg_charset()][$args['template']][$args['theme']]))
{
if (!isset($mail_template))
{
@@ -603,7 +603,7 @@ function pwg_mail($to, $args = array())
//Header
'BOUNDARY_KEY' => $conf_mail['boundary_key'],
'CONTENT_TYPE' => $args['email_format'],
- 'CONTENT_ENCODING' => $lang_info['charset'],
+ 'CONTENT_ENCODING' => get_pwg_charset(),
'LANG' => $lang_info['code'],
'DIR' => $lang_info['direction'],
@@ -650,20 +650,20 @@ function pwg_mail($to, $args = array())
// what are displayed on the header of each mail ?
$conf_mail[$args['email_format']]
- [$lang_info['charset']]
+ [get_pwg_charset()]
[$args['template']][$args['theme']]['header'] =
$mail_template->parse('mail_header', true);
// what are displayed on the footer of each mail ?
$conf_mail[$args['email_format']]
- [$lang_info['charset']]
+ [get_pwg_charset()]
[$args['template']][$args['theme']]['footer'] =
$mail_template->parse('mail_footer', true);
}
// Header
$content.= $conf_mail[$args['email_format']]
- [$lang_info['charset']]
+ [get_pwg_charset()]
[$args['template']][$args['theme']]['header'];
// Content
@@ -683,7 +683,7 @@ function pwg_mail($to, $args = array())
// Footer
$content.= $conf_mail[$args['email_format']]
- [$lang_info['charset']]
+ [get_pwg_charset()]
[$args['template']][$args['theme']]['footer'];
// Close boundary