aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/emailer.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-11-13 16:09:10 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-11-13 16:09:10 +0000
commitd1fd694282e3ebaf2046e3aee6a0d5dd92cb6659 (patch)
tree36918a361f192687384e8a32edf99104f8eff6f5 /phpBB/includes/emailer.php
parent75fadebad1e17176c82be17c7041846e4a3122df (diff)
downloadforums-d1fd694282e3ebaf2046e3aee6a0d5dd92cb6659.tar
forums-d1fd694282e3ebaf2046e3aee6a0d5dd92cb6659.tar.gz
forums-d1fd694282e3ebaf2046e3aee6a0d5dd92cb6659.tar.bz2
forums-d1fd694282e3ebaf2046e3aee6a0d5dd92cb6659.tar.xz
forums-d1fd694282e3ebaf2046e3aee6a0d5dd92cb6659.zip
Added global PM disable + modded emailer to allow lang select + re-added back box limits my dumbness removed recently
git-svn-id: file:///svn/phpbb/trunk@1305 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/emailer.php')
-rwxr-xr-xphpBB/includes/emailer.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php
index b258f3ad8a..85fe1428c3 100755
--- a/phpBB/includes/emailer.php
+++ b/phpBB/includes/emailer.php
@@ -84,23 +84,24 @@ class emailer
$this->extra_headers = $headers;
}
- function use_template($template_file)
+ function use_template($template_file, $template_lang = "")
{
- global $board_config;
+ global $board_config, $phpbb_root_path;
- $phpbb_root_path = "./";
- $template_file = $phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/email/" . $template_file . ".tpl";
- if (!file_exists($template_file))
+ if( $template_lang == "" )
+ {
+ $template_lang = $board_config['default_lang'];
+ }
+
+ $template_file = $phpbb_root_path . "language/lang_" . $template_lang . "/email/" . $template_file . ".tpl";
+ if( !file_exists($template_file) )
{
message_die(GENERAL_ERROR, "Couldn't find template file: $template_file", "", __LINE__, __FILE__);
}
else
{
$this->tpl_file = $template_file;
- //
- // Load the email text into the $this->msg variable
- //
- if(!$this->load_msg())
+ if( !$this->load_msg() )
{
message_die(GENERAL_ERROR, "Couldn't load template file: $template_file", "", __LINE__, __FILE__);
}