diff options
Diffstat (limited to 'phpBB/install')
-rwxr-xr-x | phpBB/install/index.php | 11 | ||||
-rwxr-xr-x | phpBB/install/install_install.php | 20 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 2 |
3 files changed, 23 insertions, 10 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 9a542dc2df..053ef19a17 100755 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -173,7 +173,7 @@ set_error_handler('msg_handler'); $user = new user(); $auth = new auth(); $cache = new cache(); -$template = new Template(); +$template = new template(); $template->set_custom_template('../adm/style', 'admin'); $template->assign_var('T_TEMPLATE_PATH', '../adm/style'); @@ -212,7 +212,7 @@ class module */ function create($module_type, $module_url, $selected_mod = false, $selected_submod = false) { - global $db, $config, $phpEx; + global $db, $config, $phpEx, $phpbb_root_path; $module = array(); @@ -285,10 +285,9 @@ class module $this->mode = $mode; } - /** - * @todo this could be written as $this->module = new $this->filename($this); ... no? (eval statement in install/index.php) - */ - eval("\$this->module = new $this->filename(\$this);"); + $module = $this->filename; + $this->module = new $module($this); + if (method_exists($this->module, 'main')) { $this->module->main($this->mode, $this->sub); diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index e318683334..287596497d 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -19,6 +19,19 @@ if ( !defined('IN_INSTALL') ) if (!empty($setmodules)) { + /* If phpBB is already installed we do not include this module + // This does not work at the moment because on installation the config file will be written before + // everything is finished. + if (@file_exists($phpbb_root_path . 'config.' . $phpEx)) + { + include_once($phpbb_root_path . 'config.' . $phpEx); + + if (defined('PHPBB_INSTALLED')) + { + return; + } + }*/ + $module[] = array( 'module_type' => 'install', 'module_title' => 'INSTALL', @@ -748,9 +761,9 @@ class install_install extends module // $config_data .= "\$acm_type = '" . (($acm_type) ? $acm_type : 'file') . "';\n"; $config_data .= "\$acm_type = 'file';\n"; $config_data .= "\$load_extensions = '$load_extensions';\n\n"; - $config_data .= "define('PHPBB_INSTALLED', true);\n"; - $config_data .= "define('DEBUG', true);\n"; // @todo Comment out when final - $config_data .= "define('DEBUG_EXTRA', true);\n"; // @todo Comment out when final + $config_data .= "@define('PHPBB_INSTALLED', true);\n"; + $config_data .= "@define('DEBUG', true);\n"; // @todo Comment out when final + $config_data .= "@define('DEBUG_EXTRA', true);\n"; // @todo Comment out when final $config_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused! // Attempt to write out the config file directly. If it works, this is the easiest way to do it ... @@ -927,6 +940,7 @@ class install_install extends module global $db, $lang, $template, $phpbb_root_path, $phpEx; $this->page_title = $lang['STAGE_CREATE_TABLE']; + $s_hidden_fields = ''; // Obtain any submitted data foreach ($this->request_vars as $var) diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index c2dd6babfe..fba8c5ccce 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -205,7 +205,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.B2'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.B3-dev'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); |