aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2004-02-29 12:51:18 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2004-02-29 12:51:18 +0000
commite84a8dc12cefc9e8a8b09dbe1ecc25af3cc02689 (patch)
tree5374b942d1bbce23e29b5d728decd5f0abd972d5
parent85c25a5b1789fe4d7bbbfa4395c6a2db6eedbef8 (diff)
downloadforums-e84a8dc12cefc9e8a8b09dbe1ecc25af3cc02689.tar
forums-e84a8dc12cefc9e8a8b09dbe1ecc25af3cc02689.tar.gz
forums-e84a8dc12cefc9e8a8b09dbe1ecc25af3cc02689.tar.bz2
forums-e84a8dc12cefc9e8a8b09dbe1ecc25af3cc02689.tar.xz
forums-e84a8dc12cefc9e8a8b09dbe1ecc25af3cc02689.zip
Minor alteration
git-svn-id: file:///svn/phpbb/trunk@4847 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/session.php42
1 files changed, 21 insertions, 21 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index f8e5c7aa66..f2bd4a4d6d 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -515,7 +515,6 @@ class user extends session
}
}
- include($this->lang_path . '/common.' . $phpEx);
$this->add_lang($lang_set);
unset($lang_set);
@@ -523,8 +522,7 @@ class user extends session
{
global $SID;
- $style = intval($_GET['style']);
- $SID .= '&amp;style=' . $style;
+ $SID .= '&amp;style=' . request_var('style', 0);
}
else
{
@@ -573,23 +571,6 @@ class user extends session
return;
}
- // Internal usage
- function set_lang($lang_file, $use_db = false, $use_help = false)
- {
- global $lang, $help, $phpEx;
-
- if (!$use_db)
- {
- include($this->lang_path . '/' . (($use_help) ? 'help_' : '') . $lang_file . '.' . $phpEx);
- }
- else if ($use_db)
- {
- // Get Database Language Strings
- // Put them into $lang if nothing is prefixed, put them into $help if help: is prefixed
- // For example: help:faq, posting
- }
- }
-
// Add Language Items - use_db and use_help are assigned where needed (only use them to force inclusion)
//
// $lang_set = array('posting', 'help' => 'faq');
@@ -601,11 +582,14 @@ class user extends session
{
global $lang, $help, $phpEx;
+ $lang = array();
+
+ require($this->lang_path . "common.$phpEx");
+
if (is_array($lang_set))
{
foreach ($lang_set as $key => $lang_file)
{
- $key = (string) $key;
if ($key == 'db')
{
$this->add_lang($lang_file, true, $use_help);
@@ -644,6 +628,22 @@ class user extends session
}
}
+ function set_lang($lang_file, $use_db = false, $use_help = false)
+ {
+ global $lang, $help, $phpEx;
+
+ if (!$use_db)
+ {
+ require($this->lang_path . (($use_help) ? 'help_' : '') . "$lang_file.$phpEx");
+ }
+ else if ($use_db)
+ {
+ // Get Database Language Strings
+ // Put them into $lang if nothing is prefixed, put them into $help if help: is prefixed
+ // For example: help:faq, posting
+ }
+ }
+
function format_date($gmepoch, $format = false)
{
static $lang_dates;