aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/core/core.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/core/core.php')
-rw-r--r--phpBB/includes/core/core.php46
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.