aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/classes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-12-28 10:53:28 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-12-28 10:53:28 +0000
commitfbaf2baa8d683a2afdd3cf98ea1e7c035369f1a3 (patch)
tree9b2d6d27ffde528e54f41be6b0eb51d4f3751692 /phpBB/includes/classes
parent0c1c26e2ee7badb434483001eb55d304f6c20bd0 (diff)
downloadforums-fbaf2baa8d683a2afdd3cf98ea1e7c035369f1a3.tar
forums-fbaf2baa8d683a2afdd3cf98ea1e7c035369f1a3.tar.gz
forums-fbaf2baa8d683a2afdd3cf98ea1e7c035369f1a3.tar.bz2
forums-fbaf2baa8d683a2afdd3cf98ea1e7c035369f1a3.tar.xz
forums-fbaf2baa8d683a2afdd3cf98ea1e7c035369f1a3.zip
document plugin-support
move language path declaration to object instantiation git-svn-id: file:///svn/phpbb/trunk@9239 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/classes')
-rw-r--r--phpBB/includes/classes/user.php28
1 files changed, 9 insertions, 19 deletions
diff --git a/phpBB/includes/classes/user.php b/phpBB/includes/classes/user.php
index af425f2299..85a2ee012f 100644
--- a/phpBB/includes/classes/user.php
+++ b/phpBB/includes/classes/user.php
@@ -106,10 +106,10 @@ class phpbb_user extends phpbb_session
* Constructor to set the lang path. Calls parrent::__construct()
*
* @param string $auth_method The authentication method to use, for example 'db'
- * @param string $custom_lang_path An optional language pack path.
+ * @param string $lang_path Language pack path
* @access public
*/
- public function __construct($auth_method, $custom_lang_path = false)
+ public function __construct($auth_method, $lang_path)
{
parent::__construct();
@@ -123,7 +123,13 @@ class phpbb_user extends phpbb_session
}
// Set language path
- $this->lang_path = ($custom_lang_path === false) ? PHPBB_ROOT_PATH . 'language/' : $this->set_custom_lang_path($custom_lang_path);
+ $this->lang_path = $lang_path;
+
+ // Make sure last character is a directory separator
+ if (substr($this->lang_path, -1) != DIRECTORY_SEPARATOR)
+ {
+ $this->lang_path .= DIRECTORY_SEPARATOR;
+ }
}
/**
@@ -140,22 +146,6 @@ class phpbb_user extends phpbb_session
}
/**
- * Function to set custom language path (able to use directory outside of phpBB)
- *
- * @param string $lang_path New language path used.
- * @access public
- */
- public function set_custom_lang_path($lang_path)
- {
- $this->lang_path = $lang_path;
-
- if (substr($this->lang_path, -1) != '/')
- {
- $this->lang_path .= '/';
- }
- }
-
- /**
* Setup basic user-specific items (style, language, ...)
*
* @param string|array $lang_set Language set to setup.