aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/language/language.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-11-03 20:35:24 +0100
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-11-03 20:35:24 +0100
commitc783c37c73beb2756d900f18dd24430c1b9f41ff (patch)
tree81bfded9172093113bd9d952a26532cfd361d388 /phpBB/phpbb/language/language.php
parent8b7f711a184220928f42d5ec079af18d259981d0 (diff)
parentf991e484da91e24f82fbcb05d0b2ae11ca51852b (diff)
downloadforums-c783c37c73beb2756d900f18dd24430c1b9f41ff.tar
forums-c783c37c73beb2756d900f18dd24430c1b9f41ff.tar.gz
forums-c783c37c73beb2756d900f18dd24430c1b9f41ff.tar.bz2
forums-c783c37c73beb2756d900f18dd24430c1b9f41ff.tar.xz
forums-c783c37c73beb2756d900f18dd24430c1b9f41ff.zip
Merge pull request #3995 from CHItA/ticket/14044
[ticket/14044] Deduplicate the installers * CHItA/ticket/14044: [ticket/14044] Add config as global in notify user [ticket/14044] Fix language selection data loss [ticket/14044] Patch language::set_fallback_array() [ticket/14044] Fix tests [ticket/14044] Fix wrong descriptions in install [ticket/14044] Solve missing email template error [ticket/14044] global $table_prefix in constants.php [ticket/14044] Try to fix missing table prefix [ticket/14044] Use the correct language file version [ticket/14044] Automatically trigger rollback on insert in transaction [ticket/14044] Use empty instead of !count [ticket/14044] Fix Sqlite error in tests [ticket/14044] Deduplicate the installers
Diffstat (limited to 'phpBB/phpbb/language/language.php')
-rw-r--r--phpBB/phpbb/language/language.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/phpbb/language/language.php b/phpBB/phpbb/language/language.php
index 47f055f56a..382d4db89e 100644
--- a/phpBB/phpbb/language/language.php
+++ b/phpBB/phpbb/language/language.php
@@ -549,6 +549,16 @@ class language
}
/**
+ * Returns the ISO code of the used language
+ *
+ * @return string The ISO code of the currently used language
+ */
+ public function get_used_language()
+ {
+ return $this->language_fallback[0];
+ }
+
+ /**
* Returns language fallback data
*
* @param bool $reload Whether or not to reload language files
@@ -559,12 +569,12 @@ class language
{
$fallback_array = array();
- if ($this->user_language !== false)
+ if ($this->user_language)
{
$fallback_array[] = $this->user_language;
}
- if ($this->default_language !== false)
+ if ($this->default_language)
{
$fallback_array[] = $this->default_language;
}