diff options
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/convertors/convert_phpbb20.php | 4 | ||||
-rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 2 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 26 | ||||
-rw-r--r-- | phpBB/install/install_install.php | 2 | ||||
-rw-r--r-- | phpBB/install/install_update.php | 55 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.php | 4 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_structure.php | 2 |
7 files changed, 68 insertions, 27 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 4753ae6be1..f9cc9ed194 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -494,7 +494,7 @@ if (!$get_info) array('topic_moved_id', 0, ''), array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'), array('topic_first_post_id', 'topics.topic_first_post_id', ''), - + array('topic_last_view_time', 'posts.post_time', 'intval'), array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'utf8_htmlspecialchars')), array('poll_start', 'vote_desc.vote_start', 'null_to_zero'), array('poll_length', 'vote_desc.vote_length', 'null_to_zero'), @@ -866,7 +866,7 @@ if (!$get_info) array('user_regdate', 'users.user_regdate', ''), array('username', 'users.username', 'phpbb_set_default_encoding'), // recode to utf8 with default lang array('username_clean', 'users.username', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_clean_string')), - array('user_password', 'users.user_password', ''), + array('user_password', 'users.user_password', 'phpbb_hash'), array('user_pass_convert', 1, ''), array('user_posts', 'users.user_posts', 'intval'), array('user_email', 'users.user_email', 'strtolower'), diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index a9710031f8..4b04f85ba7 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -457,7 +457,7 @@ function phpbb_get_birthday($birthday = '') } // The birthday mod from niels is using this code to transform to day/month/year - return sprintf('%2d-%2d-%4d', gmdate('n', $birthday * 86400 + 1), gmdate('j', $birthday * 86400 + 1), gmdate('Y', $birthday * 86400 + 1)); + return sprintf('%2d-%2d-%4d', gmdate('j', $birthday * 86400 + 1), gmdate('n', $birthday * 86400 + 1), gmdate('Y', $birthday * 86400 + 1)); } } diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index c9dd0a523f..2eef013742 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -10,7 +10,10 @@ $updates_to_version = '3.1.0'; -// Return if we "just include it" to find out for which version the database update is responsuble for +// Enter any version to update from to test updates. The version within the db will not be updated. +$debug_from_version = false; + +// Return if we "just include it" to find out for which version the database update is responsible for if (defined('IN_PHPBB') && defined('IN_INSTALL')) { return; @@ -86,7 +89,7 @@ header('Content-type: text/html; charset=UTF-8'); <div class="panel"> <span class="corners-top"><span></span></span> <div id="content"> - <div id="main"> + <div id="main" class="install-body"> <h1><?php echo phpbb::$user->lang['UPDATING_TO_LATEST_STABLE']; ?></h1> @@ -106,6 +109,12 @@ $current_version = str_replace('rc', 'RC', strtolower(phpbb::$config['version']) $latest_version = str_replace('rc', 'RC', strtolower($updates_to_version)); $orig_version = phpbb::$config['version']; +// Fill DB version +if (empty(phpbb::$config['dbms_version'])) +{ + set_config('dbms_version', phpbb::$db->sql_server_info(true)); +} + // If the latest version and the current version are 'unequal', we will update the version_update_from, else we do not update anything. if ($inline_update) { @@ -224,11 +233,14 @@ $errored = $no_updates = false; flush(); -// update the version -$sql = "UPDATE " . CONFIG_TABLE . " - SET config_value = '$updates_to_version' - WHERE config_name = 'version'"; -_sql($sql, $errored, $error_ary); +if ($debug_from_version === false) +{ + // update the version + $sql = "UPDATE " . CONFIG_TABLE . " + SET config_value = '$updates_to_version' + WHERE config_name = 'version'"; + _sql($sql, $errored, $error_ary); +} // Reset permissions $sql = 'UPDATE ' . USERS_TABLE . " diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 97ff0f1508..6f05a222cf 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1712,7 +1712,7 @@ class install_install extends module 'Heritrix [Crawler]' => array('heritrix/1.', ''), 'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''), 'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''), - 'ichiro [Crawler]' => array('ichiro/2', ''), + 'ichiro [Crawler]' => array('ichiro/', ''), 'Majestic-12 [Bot]' => array('MJ12bot/', ''), 'Metager [Bot]' => array('MetagerBot/', ''), 'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''), diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index b815e36e29..383a4d8cca 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -148,6 +148,12 @@ class install_update extends module )); } + // Fill DB version + if (empty(phpbb::$config['dbms_version'])) + { + set_config('dbms_version', phpbb::$db->sql_server_info(true)); + } + if ($this->test_update === false) { // Got the updater template itself updated? If so, we are able to directly use it - but only if all three files are present @@ -336,13 +342,14 @@ class install_update extends module continue; } - phpbb::$template->assign_block_vars('files', array( +/* phpbb::$template->assign_block_vars('files', array( 'S_STATUS' => true, 'STATUS' => $status, 'L_STATUS' => phpbb::$user->lang['STATUS_' . strtoupper($status)], 'TITLE' => phpbb::$user->lang['FILES_' . strtoupper($status)], 'EXPLAIN' => phpbb::$user->lang['FILES_' . strtoupper($status) . '_EXPLAIN'], - )); + ) + );*/ foreach ($filelist as $file_struct) { @@ -362,7 +369,7 @@ class install_update extends module $diff_url = append_sid($this->p_master->module_url, "mode=$mode&sub=file_check&action=diff&status=$status&file=" . urlencode($file_struct['filename'])); - phpbb::$template->assign_block_vars('files', array( + phpbb::$template->assign_block_vars($status, array( 'STATUS' => $status, 'FILENAME' => $filename, @@ -649,7 +656,7 @@ class install_update extends module default: $diff = $this->return_diff($this->old_location . $original_filename, PHPBB_ROOT_PATH . $file_struct['filename'], $this->new_location . $original_filename); - $contents = implode("\n", $diff->merged_output()); + $contents = implode("\n", $diff->merged_new_output()); unset($diff); break; } @@ -1015,7 +1022,7 @@ class install_update extends module $status = request_var('status', ''); $file = request_var('file', ''); - $diff_mode = request_var('diff_mode', 'side_by_side'); + $diff_mode = request_var('diff_mode', 'inline'); // First of all make sure the file is within our file update list with the correct status $found_entry = array(); @@ -1059,9 +1066,7 @@ class install_update extends module break; - case MERGE_NEW_FILE: - case MERGE_MOD_FILE: - +/* $diff = $this->return_diff($this->old_location . $original_file, PHPBB_ROOT_PATH . $file, $this->new_location . $original_file); $tmp = array( @@ -1078,17 +1083,37 @@ class install_update extends module $this->page_title = 'VIEWING_FILE_CONTENTS'; break; - - default: +*/ + // Merge differences and use new phpBB code for conflicted blocks + case MERGE_NEW_FILE: + case MERGE_MOD_FILE: $diff = $this->return_diff($this->old_location . $original_file, PHPBB_ROOT_PATH . $file, $this->new_location . $original_file); phpbb::$template->assign_vars(array( 'S_DIFF_CONFLICT_FILE' => true, - 'NUM_CONFLICTS' => $diff->merged_output(false, false, false, true), + 'NUM_CONFLICTS' => $diff->get_num_conflicts(), )); - $diff = $this->return_diff(PHPBB_ROOT_PATH . $file, $diff->merged_output()); + $diff = $this->return_diff(PHPBB_ROOT_PATH . $file, ($option == MERGE_NEW_FILE) ? $diff->merged_new_output() : $diff->merged_orig_output()); + break; + + // Download conflict file + default: + + $diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $file, $this->new_location . $original_file); + + header('Pragma: no-cache'); + header("Content-Type: application/octetstream; name=\"$file\""); + header("Content-disposition: attachment; filename=$file"); + + @set_time_limit(0); + + echo implode("\n", $diff->get_conflicts_content()); + + flush(); + exit; + break; } @@ -1391,9 +1416,9 @@ class install_update extends module unset($tmp); - if ($diff->merged_output(false, false, false, true)) + if ($diff->get_num_conflicts()) { - $update_ary['conflicts'] = $diff->_conflicting_blocks; + $update_ary['conflicts'] = $diff->get_num_conflicts(); // There is one special case... users having merged with a conflicting file... we need to check this $tmp = array( @@ -1420,7 +1445,7 @@ class install_update extends module $tmp = array( 'file1' => file_get_contents(PHPBB_ROOT_PATH . $file), - 'file2' => implode("\n", $diff->merged_output()), + 'file2' => implode("\n", $diff->merged_new_output()), ); // now compare the merged output with the original file to see if the modified file is up to date diff --git a/phpBB/install/schemas/schema_data.php b/phpBB/install/schemas/schema_data.php index ff14ef26fa..f4f5d3444d 100644 --- a/phpBB/install/schemas/schema_data.php +++ b/phpBB/install/schemas/schema_data.php @@ -109,6 +109,10 @@ $schema_data[] = array( array('captcha_gd_foreground_noise', '0'), array('captcha_gd_x_grid', '25'), array('captcha_gd_y_grid', '25'), + array('captcha_gd_wave', '0'), + array('captcha_gd_3d_noise', '1'), + array('captcha_gd_fonts', '1'), + array('confirm_refresh', '1'), array('check_attachment_content', '1'), array('check_dnsbl', '0'), array('chg_passforce', '0'), diff --git a/phpBB/install/schemas/schema_structure.php b/phpBB/install/schemas/schema_structure.php index f438ff2215..641fafc4ac 100644 --- a/phpBB/install/schemas/schema_structure.php +++ b/phpBB/install/schemas/schema_structure.php @@ -55,7 +55,7 @@ $schema_data['phpbb_acl_options'] = array( ), 'PRIMARY_KEY' => 'auth_option_id', 'KEYS' => array( - 'auth_option' => array('INDEX', 'auth_option'), + 'auth_option' => array('UNIQUE', 'auth_option'), ), ); |