diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-01-22 20:16:18 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-01-22 20:16:18 +0000 |
commit | 4be10373b84013f46a7ecb97059dd0dcfd7a9b5e (patch) | |
tree | 537b05f11064dc5276df260514a5d6a02f29cbab /phpBB/includes/functions.php | |
parent | 2005fb7061f7a7828dd2e49ac5f3d641b6f525fd (diff) | |
download | forums-4be10373b84013f46a7ecb97059dd0dcfd7a9b5e.tar forums-4be10373b84013f46a7ecb97059dd0dcfd7a9b5e.tar.gz forums-4be10373b84013f46a7ecb97059dd0dcfd7a9b5e.tar.bz2 forums-4be10373b84013f46a7ecb97059dd0dcfd7a9b5e.tar.xz forums-4be10373b84013f46a7ecb97059dd0dcfd7a9b5e.zip |
Merged forum nav for viewtopic/viewforum, fixed cache behavior with an empty icons table.
git-svn-id: file:///svn/phpbb/trunk@3359 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ea251c47a8..fc14135b36 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -19,7 +19,7 @@ * ***************************************************************************/ -function set_config($config_name, $config_value) +function set_config($config_name, $config_value, $is_dynamic = TRUE) { global $db, $cache, $config; @@ -41,8 +41,11 @@ function set_config($config_name, $config_value) } $config[$config_name] = $config_value; - $cache->put('config', $config); + if (!$is_dynamic) + { + $cache->put('config', $config); + } } function get_userdata($user) @@ -100,7 +103,7 @@ function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $incl // list if currently null, assign basic forum info to template function generate_forum_nav(&$forum_data) { - global $db, $user, $template; + global $db, $user, $template, $phpEx, $SID; // Get forum parents $forum_parents = array(); @@ -683,10 +686,9 @@ function obtain_word_list(&$censors) $censors['replace'][] = $row['replacement']; } while ($row = $db->sql_fetchrow($result)); - - $cache->put('word_censors', $censors); } $db->sql_freeresult($result); + $cache->put('word_censors', $censors); } return true; @@ -697,7 +699,11 @@ function obtain_icons(&$icons) { global $db, $cache; - if (!($icons = $cache->get('icons'))) + if ($cache->exists('icons')) + { + $icons = $cache->get('icons'); + } + else { // Topic icons $sql = "SELECT * |