aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/common.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-04-23 21:48:41 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-04-23 21:48:41 +0000
commit3847fc47ecddd4e518bab314622e40090b8907a6 (patch)
tree0f2360da08508c54179fa45cf4972b548994cf1a /phpBB/common.php
parent44eb035adf8e2086c89f1d5f8c0dadcea3bc32d7 (diff)
downloadforums-3847fc47ecddd4e518bab314622e40090b8907a6.tar
forums-3847fc47ecddd4e518bab314622e40090b8907a6.tar.gz
forums-3847fc47ecddd4e518bab314622e40090b8907a6.tar.bz2
forums-3847fc47ecddd4e518bab314622e40090b8907a6.tar.xz
forums-3847fc47ecddd4e518bab314622e40090b8907a6.zip
Changed: only cache non-dynamic config settings
git-svn-id: file:///svn/phpbb/trunk@3935 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/common.php')
-rw-r--r--phpBB/common.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index 5e5a5378c0..e1dac7f511 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -181,8 +181,6 @@ $cache = new acm();
$template = new template();
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
-// 20030218 Ashe: $dbport is not set by the installer
-
// Grab global variables, re-cache if necessary
if ($config = $cache->get('config'))
{
@@ -198,7 +196,7 @@ if ($config = $cache->get('config'))
}
else
{
- $config = array();
+ $config = $cached_config = array();
$sql = 'SELECT *
FROM ' . CONFIG_TABLE;
@@ -206,11 +204,17 @@ else
while ($row = $db->sql_fetchrow($result))
{
+ if (!$row['is_dynamic'])
+ {
+ $cached_config[$row['config_name']] = $row['config_value'];
+ }
+
$config[$row['config_name']] = $row['config_value'];
}
$db->sql_freeresult($result);
- $cache->put('config', $config);
+ $cache->put('config', $cached_config);
+ unset($cached_config);
}
/*