From fb2642bbc6360dacfd4a3cc9f7e9447b02cb46a1 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 10 Jan 2011 02:27:18 +0100 Subject: [task/config-class] Implemented a config class to replace the global array. There is a phpbb_config class which simply holds an array and does not persist any data. It implements ArrayAccess, Countable and IteratorAggregate to allow regular use of configuration as if it was still an array. The phpbb_config_db class depends on an instance of the dbal and a cache driver. It obtains the configuration data from cache and database as necessary and persists data to the database. The functions set_config and set_config_count remain for backward compatability but they only call methods on the new config class now instead of directly manipulating the database and cache. PHPBB3-9988 --- phpBB/style.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'phpBB/style.php') diff --git a/phpBB/style.php b/phpBB/style.php index cff91a2312..09340992c5 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -82,7 +82,10 @@ if ($id) } unset($dbpasswd); - $config = $cache->obtain_config(); + $config = new phpbb_config_db($db, $cache_factory->get_driver()); + set_config(null, null, null, $config); + set_config_count(null, null, null, $config); + $user = false; // try to get a session ID from REQUEST array -- cgit v1.2.1