diff options
| author | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:37 +0100 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:37 +0100 |
| commit | aa4495b8ad0cf90c2b3f655441ccfee49701282d (patch) | |
| tree | e70cd18c1f03e6a0219bd0fbe41d896b350e974e /phpBB/install | |
| parent | 8a3c323933cbdadd302ed49b5769f90c3f622cdc (diff) | |
| parent | 0aef1e57a73ef4c7086cf24ed154e8d5bbbac679 (diff) | |
| download | forums-aa4495b8ad0cf90c2b3f655441ccfee49701282d.tar forums-aa4495b8ad0cf90c2b3f655441ccfee49701282d.tar.gz forums-aa4495b8ad0cf90c2b3f655441ccfee49701282d.tar.bz2 forums-aa4495b8ad0cf90c2b3f655441ccfee49701282d.tar.xz forums-aa4495b8ad0cf90c2b3f655441ccfee49701282d.zip | |
Merge commit 'release-3.0-RC8'
Diffstat (limited to 'phpBB/install')
| -rw-r--r-- | phpBB/install/convertors/convert_phpbb20.php | 4 | ||||
| -rw-r--r-- | phpBB/install/database_update.php | 25 | ||||
| -rw-r--r-- | phpBB/install/install_convert.php | 26 | ||||
| -rwxr-xr-x | phpBB/install/install_install.php | 31 | ||||
| -rw-r--r-- | phpBB/install/install_update.php | 4 | ||||
| -rw-r--r-- | phpBB/install/schemas/schema_data.sql | 4 |
6 files changed, 53 insertions, 41 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 91a9951e90..d4972c5a00 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -31,7 +31,7 @@ unset($dbpasswd); */ $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', - 'version' => '1.0.RC7', + 'version' => '1.0.RC8', 'phpbb_version' => '3.0.0', 'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>', 'dbms' => $dbms, @@ -571,7 +571,7 @@ if (!$get_info) 'primary' => 'vote_desc.topic_id', 'query_first' => array('target', $convert->truncate_statement . POLL_VOTES_TABLE), - array('poll_option_id', 1, ''), + array('poll_option_id', VOTE_CONVERTED, ''), array('topic_id', 'vote_desc.topic_id', ''), array('vote_user_id', 'vote_voters.vote_user_id', 'phpbb_user_id'), array('vote_user_ip', 'vote_voters.vote_user_ip', 'decode_ip'), diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 4d878b15c0..0145c2746a 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -$updates_to_version = '3.0.RC7'; +$updates_to_version = '3.0.RC8'; // Return if we "just include it" to find out for which version the database update is responsuble for if (defined('IN_PHPBB') && defined('IN_INSTALL')) @@ -1014,7 +1014,7 @@ if ($exit) </div> <div id="page-footer"> - Powered by phpBB © 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a> + Powered by <a href="http://www.phpbb.com/">phpBB</a> © 2000, 2002, 2005, 2007 phpBB Group </div> </div> @@ -1178,7 +1178,7 @@ if (version_compare($current_version, '3.0.RC2', '<=')) } $db->sql_freeresult($result); - foreach($smileys as $id => $code) + foreach ($smileys as $id => $code) { // 2.0 only entitized lt and gt; We need to do something about double quotes. if (strchr($code, '"') === false) @@ -1759,7 +1759,7 @@ function column_exists($dbms, $table, $column_name) case 'mssql': $sql = "SELECT c.name FROM syscolumns c - LEFT JOIN sysobjects o (ON c.id = o.id) + LEFT JOIN sysobjects o ON c.id = o.id WHERE o.name = '{$table}'"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -1913,7 +1913,6 @@ function prepare_column_data($dbms, $column_data, $table_name, $column_name) } $sql = ''; - $return_array = array(); switch ($dbms) @@ -1938,22 +1937,26 @@ function prepare_column_data($dbms, $column_data, $table_name, $column_name) case 'mssql': $sql .= " {$column_type} "; + $sql_default = " {$column_type} "; - // we do not support MSSQL DEFAULTs for the near future - /*if (!is_null($column_data[1])) + // For adding columns we need the default definition + if (!is_null($column_data[1])) { // For hexadecimal values do not use single quotes if (strpos($column_data[1], '0x') === 0) { - $sql .= 'DEFAULT (' . $column_data[1] . ') '; + $sql_default .= 'DEFAULT (' . $column_data[1] . ') '; } else { - $sql .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') '; + $sql_default .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') '; } - }*/ + } $sql .= 'NOT NULL'; + $sql_default .= 'NOT NULL'; + + $return_array['column_type_sql_default'] = $sql_default; break; case 'mysql_40': @@ -2059,7 +2062,7 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data) break; case 'mssql': - $sql = 'ALTER TABLE [' . $table_name . '] ADD [' . $column_name . '] ' . $column_data['column_type_sql']; + $sql = 'ALTER TABLE [' . $table_name . '] ADD [' . $column_name . '] ' . $column_data['column_type_sql_default']; _sql($sql, $errored, $error_ary); break; diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 6fd5016a42..d1e36ec4a4 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -184,8 +184,8 @@ class install_convert extends module 'L_CONTINUE' => $lang['CONTINUE_OLD_CONVERSION'], 'S_CONTINUE' => true, - 'U_NEW_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=intro&new_conv=1", - 'U_CONTINUE_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$options['tag']}{$options['step']}", + 'U_NEW_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=intro&new_conv=1&language=$language", + 'U_CONTINUE_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$options['tag']}{$options['step']}&language=$language", )); return; @@ -261,7 +261,7 @@ class install_convert extends module */ function list_convertors($sub) { - global $lang, $template, $phpbb_root_path, $phpEx; + global $lang, $language, $template, $phpbb_root_path, $phpEx; $this->page_title = $lang['SUB_INTRO']; @@ -327,7 +327,7 @@ class install_convert extends module 'SOFTWARE' => $convertors[$index]['forum_name'], 'VERSION' => $convertors[$index]['version'], - 'U_CONVERT' => $this->p_master->module_url . "?mode={$this->mode}&sub=settings&tag=" . $convertors[$index]['tag'], + 'U_CONVERT' => $this->p_master->module_url . "?mode={$this->mode}&language=$language&sub=settings&tag=" . $convertors[$index]['tag'], )); } } @@ -336,7 +336,7 @@ class install_convert extends module */ function get_convert_settings($sub) { - global $lang, $template, $db, $phpbb_root_path, $phpEx, $config, $cache; + global $lang, $language, $template, $db, $phpbb_root_path, $phpEx, $config, $cache; require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); @@ -528,7 +528,7 @@ class install_convert extends module $template->assign_vars(array( 'L_SUBMIT' => $lang['BEGIN_CONVERT'], // 'S_HIDDEN' => $s_hidden_fields, - 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag=$convertor_tag", + 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag=$convertor_tag&language=$language", )); return; @@ -576,7 +576,7 @@ class install_convert extends module 'TITLE' => $lang['STAGE_SETTINGS'], 'BODY' => $lang['CONV_OPTIONS_BODY'], 'L_SUBMIT' => $lang['BEGIN_CONVERT'], - 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=settings&tag=$convertor_tag", + 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=settings&tag=$convertor_tag&language=$language", )); } @@ -858,7 +858,7 @@ class install_convert extends module $template->assign_vars(array( 'L_SUBMIT' => $user->lang['INSTALL_TEST'], - 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}", + 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}&language=$language", )); return; } @@ -1177,7 +1177,7 @@ class install_convert extends module if (!empty($schema['group_by'])) { $schema['group_by'] = array($schema['group_by']); - foreach($sql_data['select_fields'] as $select) + foreach ($sql_data['select_fields'] as $select) { $alias = strpos(strtolower($select), ' as '); $select = ($alias) ? substr($select, 0, $alias) : $select; @@ -1530,7 +1530,7 @@ class install_convert extends module */ function save_convert_progress($step) { - global $convert; + global $convert, $language; // Save convertor Status set_config('convert_progress', serialize(array( @@ -1551,7 +1551,7 @@ class install_convert extends module 'dbpasswd' => $convert->src_dbpasswd, )), true); - return $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}$step"; + return $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}$step&language=$language"; } /** @@ -1559,7 +1559,7 @@ class install_convert extends module */ function finish_conversion() { - global $db, $phpbb_root_path, $convert, $config, $user, $template; + global $db, $phpbb_root_path, $convert, $config, $language, $user, $template; $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'convert_progress' @@ -1574,7 +1574,7 @@ class install_convert extends module // And finally, add a note to the log add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']); - $url = $this->p_master->module_url . "?mode={$this->mode}&sub=final"; + $url = $this->p_master->module_url . "?mode={$this->mode}&sub=final&language=$language"; $template->assign_vars(array( 'L_SUBMIT' => $user->lang['FINAL_STEP'], diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index ca86816e9c..3afdb66e1e 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -9,11 +9,6 @@ */ /** -* @todo: check for those functions being 'available'? Though not able to check with function_exists, we need to create test cases -* ini_get(), glob, getimagesize, fsockopen, readfile -*/ - -/** */ if (!defined('IN_INSTALL')) { @@ -487,7 +482,7 @@ class install_install extends module 'LEGEND_EXPLAIN' => $lang['FILES_OPTIONAL_EXPLAIN'], )); - $directories = array('config.'.$phpEx, 'images/avatars/upload/'); + $directories = array('config.' . $phpEx, 'images/avatars/upload/'); foreach ($directories as $dir) { @@ -936,7 +931,7 @@ class install_install extends module // Note that all we check is that the file has _something_ in it // We don't compare the contents exactly - if they can't upload // a single file correctly, it's likely they will have other problems.... - if (filesize($phpbb_root_path . 'config.'.$phpEx) > 10) + if (filesize($phpbb_root_path . 'config.' . $phpEx) > 10) { $written = true; } @@ -1116,11 +1111,18 @@ class install_install extends module // If we get here and the extension isn't loaded it should be safe to just go ahead and load it $available_dbms = get_available_dbms($data['dbms']); + if (!isset($available_dbms[$data['dbms']])) + { + // Someone's been silly and tried providing a non-existant dbms + $this->p_master->redirect("index.$phpEx?mode=install"); + } + + $dbms = $available_dbms[$data['dbms']]['DRIVER']; + // Load the appropriate database class if not already loaded - include($phpbb_root_path . 'includes/db/' . $available_dbms[$data['dbms']]['DRIVER'] . '.' . $phpEx); + include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); // Instantiate the database - $sql_db = 'dbal_' . $available_dbms[$data['dbms']]['DRIVER']; $db = new $sql_db(); $db->sql_connect($data['dbhost'], $data['dbuser'], $data['dbpasswd'], $data['dbname'], $data['dbport'], false, false); @@ -1393,11 +1395,18 @@ class install_install extends module // If we get here and the extension isn't loaded it should be safe to just go ahead and load it $available_dbms = get_available_dbms($data['dbms']); + if (!isset($available_dbms[$data['dbms']])) + { + // Someone's been silly and tried providing a non-existant dbms + $this->p_master->redirect("index.$phpEx?mode=install"); + } + + $dbms = $available_dbms[$data['dbms']]['DRIVER']; + // Load the appropriate database class if not already loaded - include($phpbb_root_path . 'includes/db/' . $available_dbms[$data['dbms']]['DRIVER'] . '.' . $phpEx); + include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); // Instantiate the database - $sql_db = 'dbal_' . $available_dbms[$data['dbms']]['DRIVER']; $db = new $sql_db(); $db->sql_connect($data['dbhost'], $data['dbuser'], $data['dbpasswd'], $data['dbname'], $data['dbport'], false, false); diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 320747b60b..22d3af9d2a 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -604,7 +604,7 @@ class install_update extends module // Before we do anything, let us diff the files and store the raw file information "somewhere" $get_files = false; - $file_list = false; //$cache->get('_diff_files'); + $file_list = $cache->get('_diff_files'); if ($file_list === false || $file_list['status'] != -1) { @@ -1513,7 +1513,7 @@ class install_update extends module { case 'version_info': global $phpbb_root_path, $phpEx; - $info = get_remote_file('www.phpbb.com', '/updatecheck', '30x.txt', $errstr, $errno); + $info = get_remote_file('www.phpbb.com', '/updatecheck', ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); if ($info !== false) { diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index eb333b7e5a..51e87629fe 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -144,7 +144,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_guests INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_time', '5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_onlinetrack', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_search', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_tplcompile', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_tplcompile', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_user_activity', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments_pm', '1'); @@ -213,7 +213,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.RC7'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC8'); 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'); |
