diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2011-01-12 01:49:44 +0100 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2011-01-12 01:49:44 +0100 |
| commit | a3673789402eae83b94860c87747091125701f78 (patch) | |
| tree | c95893f38eb1c52df491e2bab2b986bb51f21883 /phpBB/install/database_update.php | |
| parent | 30dacf8e4e313355c4694db2455e453a0ed62a11 (diff) | |
| parent | f11579549d0250733f4a2bd1759adc2db6d587d3 (diff) | |
| download | forums-a3673789402eae83b94860c87747091125701f78.tar forums-a3673789402eae83b94860c87747091125701f78.tar.gz forums-a3673789402eae83b94860c87747091125701f78.tar.bz2 forums-a3673789402eae83b94860c87747091125701f78.tar.xz forums-a3673789402eae83b94860c87747091125701f78.zip | |
Merge branch 'task/naderman/config-class' into develop
* task/naderman/config-class:
[task/config-class] Do not create multiple cache driver instances.
[task/config-class] Add an attribute for the table name in phpbb_config_db.
[task/config-class] Correctly merge cached config with dynamically loaded data.
[task/config-class] Always specify the config table to use.
[task/config-class] Fix db config constructor param order
[task/config-class] Implemented a config class to replace the global array.
Diffstat (limited to 'phpBB/install/database_update.php')
| -rw-r--r-- | phpBB/install/database_update.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index f73f7472f0..4eedf7aa33 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -96,8 +96,8 @@ $class_loader->register(); // set up caching $cache_factory = new phpbb_cache_factory($acm_type); -$class_loader->set_cache($cache_factory->get_driver()); $cache = $cache_factory->get_service(); +$class_loader->set_cache($cache->get_driver()); $request = new phpbb_request(); $user = new user(); @@ -165,17 +165,9 @@ include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx); $inline_update = (request_var('type', 0)) ? true : false; // To let set_config() calls succeed, we need to make the config array available globally -$config = array(); - -$sql = 'SELECT * - FROM ' . CONFIG_TABLE; -$result = $db->sql_query($sql); - -while ($row = $db->sql_fetchrow($result)) -{ - $config[$row['config_name']] = $row['config_value']; -} -$db->sql_freeresult($result); +$config = new phpbb_config_db($db, $cache->get_driver(), CONFIG_TABLE); +set_config(null, null, null, $config); +set_config_count(null, null, null, $config); // We do not include DB Tools here, because we can not be sure the file is up-to-date ;) // Instead, this file defines a clean db_tools version (we are also not able to provide a different file, else the database update will not work standalone) |
