Author: J.M. Roth Description: Modifies the newly shipped installer to - NOT show convert tab - be able to run even though config.php is there (which in Debian, it is always) - remove output that has no meaning/is confusing here or links to unexisting files Last-Update: 2013-09-28 --- a/install/database_update.php +++ b/install/database_update.php @@ -67,7 +67,7 @@ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type)) { - die("Please read: INSTALL.html before attempting to update."); + die("Make sure you have a running board before trying to upgrade anything."); } // Load Extensions --- a/install/index.php +++ b/install/index.php @@ -244,14 +244,14 @@ } $setmodules = 1; - while (($file = readdir($dir)) !== false) + while (($file = readdir()) !== false) { if (preg_match('#^install_(.*?)\.' . $phpEx . '$#', $file)) { include($file); } } - closedir($dir); + closedir(); unset($setmodules); --- a/install/install_convert.php +++ b/install/install_convert.php @@ -10,7 +10,7 @@ /** */ - +return; if (!defined('IN_INSTALL')) { // Someone has tried to access the file direct. This is not a good idea, so exit --- a/install/install_install.php +++ b/install/install_install.php @@ -23,7 +23,7 @@ { include_once($phpbb_root_path . 'config.' . $phpEx); - if (defined('PHPBB_INSTALLED')) + if (empty($GLOBALS['dbhost'])) { return; } @@ -947,8 +947,8 @@ if (isset($_POST['dlconfig'])) { // They want a copy of the file to download, so send the relevant headers and dump out the data - header("Content-Type: text/x-delimtext; name=\"config.$phpEx\""); - header("Content-disposition: attachment; filename=config.$phpEx"); + header("Content-Type: text/x-delimtext; name=\"alternate_config.$phpEx\""); + header("Content-disposition: attachment; filename=alternate_config.$phpEx"); echo $config_data; exit; } @@ -1026,6 +1026,7 @@ // Replace backslashes and doubled slashes (could happen on some proxy setups) $name = str_replace(array('\\', '//'), '/', $name); + $name = preg_replace('#/-\w*?/#', '/', $name); $data['script_path'] = trim(dirname(dirname($name))); } @@ -1366,6 +1367,19 @@ WHERE config_name = 'captcha_gd'"; } + $db_debian = array( // config table (name,value) pairs + 'sitename' => 'Your new phpBB board', + 'site_desc' => 'Powered by Debian', + 'board_disable' => '1', + 'captcha_gd_x_grid' => rand(11,24), + 'captcha_gd_y_grid' => rand(6,24), + ); + foreach ($db_debian as $n => $v) { + $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '$v' + WHERE config_name = '$n'"; + } + $ref = substr($referer, strpos($referer, '://') + 3); if (!(stripos($ref, $server_name) === 0)) @@ -1939,7 +1953,7 @@ $template->assign_vars(array( 'TITLE' => $lang['INSTALL_CONGRATS'], - 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $data['language']), '../docs/README.html'), + 'BODY' => '', 'L_SUBMIT' => $lang['INSTALL_LOGIN'], 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx, 'i=send_statistics&mode=send_statistics'), )); --- a/install/install_main.php +++ b/install/install_main.php @@ -24,7 +24,7 @@ 'module_title' => 'OVERVIEW', 'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1), 'module_order' => 0, - 'module_subs' => array('INTRO', 'LICENSE', 'SUPPORT'), + 'module_subs' => array('INTRO'), 'module_stages' => '', 'module_reqs' => '' ); --- a/language/en/install.php +++ b/language/en/install.php @@ -288,7 +288,7 @@ 'NO_LOCATION' => 'Cannot determine location. If you know Imagemagick is installed, you may specify the location later within your administration control panel', 'NO_TABLES_FOUND' => 'No tables found.', - 'OVERVIEW_BODY' => 'Welcome to phpBB3!

phpBB® is the most widely used open source bulletin board solution in the world. phpBB3 is the latest installment in a package line started in 2000. Like its predecessors, phpBB3 is feature-rich, user-friendly, and fully supported by the phpBB Team. phpBB3 greatly improves on what made phpBB2 popular, and adds commonly requested features that were not present in previous versions. We hope it exceeds your expectations.

This installation system will guide you through installing phpBB3, updating to the latest version of phpBB3 from past releases, as well as converting to phpBB3 from a different discussion board system (including phpBB2). For more information, we encourage you to read the installation guide.

To read the phpBB3 license or learn about obtaining support and our stance on it, please select the respective options from the side menu. To continue, please select the appropriate tab above.', + 'OVERVIEW_BODY' => 'Welcome to phpBB3!

If you want to use the Database Updater to update your (multisite) database manually, click here. Remember that you have to do this for each one of your forums after each application update.', 'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support', 'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will not run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.',