diff options
Diffstat (limited to 'phpBB/install')
| -rw-r--r-- | phpBB/install/convertors/convert_phpbb20.php | 2 | ||||
| -rw-r--r-- | phpBB/install/database_update.php | 26 | ||||
| -rw-r--r-- | phpBB/install/install_update.php | 2 | ||||
| -rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 4 | ||||
| -rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 4 | ||||
| -rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 4 | ||||
| -rw-r--r-- | phpBB/install/schemas/schema_data.sql | 2 | ||||
| -rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 4 |
8 files changed, 33 insertions, 15 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index d4972c5a00..16b500d8d5 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.RC8', + 'version' => '1.0.0', 'phpbb_version' => '3.0.0', 'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>', 'dbms' => $dbms, diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 0145c2746a..fc9ce65dac 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -$updates_to_version = '3.0.RC8'; +$updates_to_version = '3.0.0'; // 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')) @@ -463,6 +463,16 @@ $database_update_info = array( ), ), ), + // Changes from 3.0.RC8 to the next version + '3.0.RC8' => array( + // Change the following columns + 'change_columns' => array( + USERS_TABLE => array( + 'user_new_privmsg' => array('INT:4', 0), + 'user_unread_privmsg' => array('INT:4', 0), + ), + ), + ), ); // Determine mapping database type @@ -571,7 +581,7 @@ else // Checks/Operations that have to be completed prior to starting the update itself $exit = false; -if (version_compare($current_version, '3.0.RC4', '<=')) +if (version_compare($current_version, '3.0.RC8', '<=')) { // Define missing language entries... if (!isset($lang['CLEANING_USERNAMES'])) @@ -715,9 +725,13 @@ if (version_compare($current_version, '3.0.RC4', '<=')) // duplicates might be created. Since the column has to be unique such usernames // must not exist. We need identify them and let the admin decide what to do // about them. + // After RC8 this was changed again, but this time only usernames containing spaces + // are affected. + $sql_where = (version_compare($current_version, '3.0.RC4', '<=')) ? '' : "WHERE username_clean LIKE '% %'"; $sql = 'SELECT user_id, username, username_clean - FROM ' . USERS_TABLE . ' - ORDER BY user_id ASC'; + FROM ' . USERS_TABLE . " + $sql_where + ORDER BY user_id ASC"; $result = $db->sql_query($sql); $colliding_users = $found_names = array(); @@ -1635,6 +1649,8 @@ $cache->purge(); <?php +garbage_collection(); + if (function_exists('exit_handler')) { exit_handler(); @@ -2765,6 +2781,8 @@ function utf8_new_clean_string($text) // Other control characters $text = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $text); + $text = preg_replace('# {2,}#', ' ', $text); + // we can use trim here as all the other space characters should have been turned // into normal ASCII spaces by now return trim($text); diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 22d3af9d2a..adbe03283b 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -1232,7 +1232,7 @@ class install_update extends module foreach ($this->update_info['files'] as $index => $file) { - if (is_int($update_list['status']) && $index <= $update_list['status']) + if (is_int($update_list['status']) && $index < $update_list['status']) { continue; } diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index a4f617209b..0f20b1030a 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -917,8 +917,8 @@ CREATE TABLE phpbb_users ( user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varbinary(6) DEFAULT '' NOT NULL, - user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL, - user_unread_privmsg tinyint(4) DEFAULT '0' NOT NULL, + user_new_privmsg int(4) DEFAULT '0' NOT NULL, + user_unread_privmsg int(4) DEFAULT '0' NOT NULL, user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_full_folder int(11) DEFAULT '-3' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 618b98b280..2d91b0259e 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -917,8 +917,8 @@ CREATE TABLE phpbb_users ( user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varchar(6) DEFAULT '' NOT NULL, - user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL, - user_unread_privmsg tinyint(4) DEFAULT '0' NOT NULL, + user_new_privmsg int(4) DEFAULT '0' NOT NULL, + user_unread_privmsg int(4) DEFAULT '0' NOT NULL, user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_full_folder int(11) DEFAULT '-3' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 34ebe22742..1f20c17583 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -1180,8 +1180,8 @@ CREATE TABLE phpbb_users ( user_style INT2 DEFAULT '0' NOT NULL CHECK (user_style >= 0), user_rank INT4 DEFAULT '0' NOT NULL CHECK (user_rank >= 0), user_colour varchar(6) DEFAULT '' NOT NULL, - user_new_privmsg INT2 DEFAULT '0' NOT NULL, - user_unread_privmsg INT2 DEFAULT '0' NOT NULL, + user_new_privmsg INT4 DEFAULT '0' NOT NULL, + user_unread_privmsg INT4 DEFAULT '0' NOT NULL, user_last_privmsg INT4 DEFAULT '0' NOT NULL CHECK (user_last_privmsg >= 0), user_message_rules INT2 DEFAULT '0' NOT NULL CHECK (user_message_rules >= 0), user_full_folder INT4 DEFAULT '-3' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 51e87629fe..254b067b55 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -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.RC8'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.0'); 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'); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 5e2d28b5bc..fa5884cc5b 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -887,8 +887,8 @@ CREATE TABLE phpbb_users ( user_style INTEGER UNSIGNED NOT NULL DEFAULT '0', user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0', user_colour varchar(6) NOT NULL DEFAULT '', - user_new_privmsg tinyint(4) NOT NULL DEFAULT '0', - user_unread_privmsg tinyint(4) NOT NULL DEFAULT '0', + user_new_privmsg int(4) NOT NULL DEFAULT '0', + user_unread_privmsg int(4) NOT NULL DEFAULT '0', user_last_privmsg INTEGER UNSIGNED NOT NULL DEFAULT '0', user_message_rules INTEGER UNSIGNED NOT NULL DEFAULT '0', user_full_folder int(11) NOT NULL DEFAULT '-3', |
