aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2005-04-10 11:21:01 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2005-04-10 11:21:01 +0000
commitc9478353171267a3ebc5d87b43d759d22684b21e (patch)
tree0c2de101bd65d5c24e73344be53b2d9619ce037d /phpBB/includes/functions.php
parenta01705c7d04581871c3028d7369815ecd06fca75 (diff)
downloadforums-c9478353171267a3ebc5d87b43d759d22684b21e.tar
forums-c9478353171267a3ebc5d87b43d759d22684b21e.tar.gz
forums-c9478353171267a3ebc5d87b43d759d22684b21e.tar.bz2
forums-c9478353171267a3ebc5d87b43d759d22684b21e.tar.xz
forums-c9478353171267a3ebc5d87b43d759d22684b21e.zip
- fixed custom profile field get/store
- changed tz lang array to hold more descriptive timezones (no more tz+-13, dst is a seperate option) - fixed bugs after jabber queue processing (data being escaped differently) git-svn-id: file:///svn/phpbb/trunk@5116 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 0e08133c23..7eacbe91fd 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -96,6 +96,7 @@ function set_config($config_name, $config_value, $is_dynamic = false)
if (!$is_dynamic)
{
$cache->destroy('config');
+ $cache->save();
}
}
@@ -380,6 +381,18 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
while ($row = $db->sql_fetchrow($result))
{
+ if ($row['left_id'] < $right)
+ {
+ $padding++;
+ $padding_store[$row['parent_id']] = $padding;
+ }
+ else if ($row['left_id'] > $right + 1)
+ {
+ $padding = $padding_store[$row['parent_id']];
+ }
+
+ $right = $row['right_id'];
+
if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']))
{
// Non-postable forum with no subforums, don't display
@@ -409,18 +422,6 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
$display_jumpbox = true;
}
- if ($row['left_id'] < $right)
- {
- $padding++;
- $padding_store[$row['parent_id']] = $padding;
- }
- else if ($row['left_id'] > $right + 1)
- {
- $padding = $padding_store[$row['parent_id']];
- }
-
- $right = $row['right_id'];
-
$template->assign_block_vars('jumpbox_forums', array(
'FORUM_ID' => $row['forum_id'],
'FORUM_NAME' => $row['forum_name'],
@@ -1360,6 +1361,7 @@ function login_forum_box(&$forum_data)
}
while ($row = $db->sql_fetchrow($result));
+ // Remove expired sessions
$sql = 'DELETE FROM ' . FORUMS_ACCESS_TABLE . '
WHERE session_id NOT IN (' . implode(', ', $sql_in) . ')';
$db->sql_query($sql);
@@ -1887,7 +1889,7 @@ function page_header($page_title = '')
'S_CONTENT_ENCODING' => $user->lang['ENCODING'],
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'],
- 'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''),
+ 'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], (($tz >= 0) ? '+' . $tz : $tz), $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], (($tz >= 0) ? '+' . $tz : $tz), ''),
'S_DISPLAY_ONLINE_LIST' => (!empty($config['load_online'])) ? 1 : 0,
'S_DISPLAY_SEARCH' => (!empty($config['load_search'])) ? 1 : 0,
'S_DISPLAY_PM' => (!empty($config['allow_privmsg'])) ? 1 : 0,