aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_messenger.php
diff options
context:
space:
mode:
authorJosh Woody <a_jelly_doughnut@phpbb.com>2010-01-26 04:11:58 +0000
committerJosh Woody <a_jelly_doughnut@phpbb.com>2010-01-26 04:11:58 +0000
commitb4d6b1e980473914601e1fb1a9c0cc0e4a6fde57 (patch)
treeed21a8875c5555a2f98b36f540b9ad0c58c09240 /phpBB/includes/functions_messenger.php
parenta314b2807fc90ffa710394934d2680d7c363eb1d (diff)
downloadforums-b4d6b1e980473914601e1fb1a9c0cc0e4a6fde57.tar
forums-b4d6b1e980473914601e1fb1a9c0cc0e4a6fde57.tar.gz
forums-b4d6b1e980473914601e1fb1a9c0cc0e4a6fde57.tar.bz2
forums-b4d6b1e980473914601e1fb1a9c0cc0e4a6fde57.tar.xz
forums-b4d6b1e980473914601e1fb1a9c0cc0e4a6fde57.zip
Further fixes for r10447 and r10448. Correctly account for custom language directories (caught by naderman)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10449 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
-rw-r--r--phpBB/includes/functions_messenger.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 3286e9171b..4b69b26eb6 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -182,7 +182,16 @@ class messenger
trigger_error('No template file for emailing set.', E_USER_ERROR);
}
- if (!trim($template_lang) || !file_exists("{$phpbb_root_path}language/{$template_lang}/email/$template_file.txt"))
+ if (!$template_path)
+ {
+ $path_check = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
+ }
+ else
+ {
+ $path_check = $template_path;
+ }
+
+ if (!trim($template_lang) || !file_exists("$path_check$template_lang/email/$template_file.txt"))
{
// fall back to board default language if the user's language is
// missing $template_file. If this does not exist either,