diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-01-20 16:54:15 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-01-20 16:54:15 +0000 |
commit | cd4091af43fa2d7d3dbe5ad0d583c63f1d96c903 (patch) | |
tree | b60c6980ad85e4a8daf48a10c3ab9e2efa4f29c2 /phpBB/includes/core/core.php | |
parent | b55f9854e770ba7c37e0e1914c8570c856cbecf3 (diff) | |
download | forums-cd4091af43fa2d7d3dbe5ad0d583c63f1d96c903.tar forums-cd4091af43fa2d7d3dbe5ad0d583c63f1d96c903.tar.gz forums-cd4091af43fa2d7d3dbe5ad0d583c63f1d96c903.tar.bz2 forums-cd4091af43fa2d7d3dbe5ad0d583c63f1d96c903.tar.xz forums-cd4091af43fa2d7d3dbe5ad0d583c63f1d96c903.zip |
i am not sure if people will like the config layout i test here... it requires the framework at least being present
git-svn-id: file:///svn/phpbb/trunk@9281 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/core/core.php')
-rw-r--r-- | phpBB/includes/core/core.php | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/phpBB/includes/core/core.php b/phpBB/includes/core/core.php index 717ff0d4a2..09b6365da2 100644 --- a/phpBB/includes/core/core.php +++ b/phpBB/includes/core/core.php @@ -81,7 +81,24 @@ abstract class phpbb * @var array The phpBB configuration array */ public static $config = array(); - /**#@-*/ + + /** + * @var array The base configuration array + */ + public static $base_config = array( + 'table_prefix' => 'phpbb_', + 'admin_folder' => 'adm', + 'acm_type' => 'file', + + 'config_set' => false, + 'extensions_set' => false, + + 'memory_usage' => 0, + + 'debug' => false, + 'debug_extra' => false, + 'installed' => false, + ); /**#@+ * Permission constant @@ -145,6 +162,33 @@ abstract class phpbb } /** + * Set base configuration - called from config.php file + */ + public static function set_config($config) + { + phpbb::$base_config = array_merge(phpbb::$base_config, $config); + phpbb::$base_config['config_set'] = true; + + if (phpbb::$base_config['debug_extra'] && function_exists('memory_get_usage')) + { + phpbb::$base_config['memory_usage'] = memory_get_usage(); + } + + // Load Extensions + if (!empty(phpbb::$base_config['extensions']) && !phpbb::$base_config['extensions_set']) + { + $load_extensions = explode(',', phpbb::$base_config['extensions']); + + foreach ($load_extensions as $extension) + { + @dl(trim($extension)); + } + + phpbb::$base_config['extensions_set'] = true; + } + } + + /** * Get instance of static property * * @param string $variable The name of the instance to retrieve. |