diff options
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/convertors/convert_phpbb20.php | 5 | ||||
-rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 10 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 10 | ||||
-rw-r--r-- | phpBB/install/index.php | 9 | ||||
-rw-r--r-- | phpBB/install/install_install.php | 2 | ||||
-rw-r--r-- | phpBB/install/install_update.php | 8 | ||||
-rw-r--r-- | phpBB/install/schemas/schema.json | 33 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 12 |
8 files changed, 50 insertions, 39 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 696075b07c..4ec408a670 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms); $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', 'version' => '1.0.3', - 'phpbb_version' => '3.1.0-RC2', + 'phpbb_version' => '3.1.0-RC4', 'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>', 'dbms' => $dbms, 'dbhost' => $dbhost, @@ -896,8 +896,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', 'phpbb_hash'), - array('user_pass_convert', 1, ''), + array('user_password', 'users.user_password', 'phpbb_convert_password_hash'), array('user_posts', 'users.user_posts', 'intval'), array('user_email', 'users.user_email', 'strtolower'), array('user_email_hash', 'users.user_email', 'gen_email_hash'), diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 01447a6232..817c007274 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -1969,3 +1969,13 @@ function phpbb_add_notification_options($user_notify_pm) $sql = $db->sql_multi_insert(USER_NOTIFICATIONS_TABLE, $rows); } + +function phpbb_convert_password_hash($hash) +{ + global $phpbb_container; + + $manager = $phpbb_container->get('passwords.manager'); + $hash = $manager->hash($hash, '$H$'); + + return '$CP$' . $hash; +} diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 517143792a..8016ff349b 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -13,10 +13,6 @@ $update_start_time = time(); -use Symfony\Component\Config\FileLocator; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; - /** * @ignore */ @@ -181,11 +177,13 @@ $migrator = $phpbb_container->get('migrator'); $migrator->create_migrations_table(); $phpbb_extension_manager = $phpbb_container->get('ext.manager'); -$finder = $phpbb_extension_manager->get_finder(); -$migrations = $finder +$migrations = $phpbb_extension_manager + ->get_finder() ->core_path('phpbb/db/migration/data/') + ->extension_directory('/migrations') ->get_classes(); + $migrator->set_migrations($migrations); // What is a safe limit of execution time? Half the max execution time should be safe. diff --git a/phpBB/install/index.php b/phpBB/install/index.php index d443c537fa..5c16421499 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -11,10 +11,6 @@ * */ -use Symfony\Component\Config\FileLocator; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; - /**#@+ * @ignore */ @@ -244,7 +240,7 @@ $sub = $request->variable('sub', ''); // Set PHP error handler to ours set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); -$user = new \phpbb\user(); +$user = new \phpbb\user('\phpbb\datetime'); $auth = new \phpbb\auth\auth(); // Add own hook handler, if present. :o @@ -449,8 +445,7 @@ class module header('Content-type: text/html; charset=UTF-8'); header('Cache-Control: private, no-cache="set-cookie"'); - header('Expires: 0'); - header('Pragma: no-cache'); + header('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT'); return; } diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index b82df84a00..20b211dde9 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1382,7 +1382,7 @@ class install_install extends module if (@extension_loaded('gd')) { $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config - SET config_value = 'phpbb_captcha_gd' + SET config_value = 'core.captcha.plugins.gd' WHERE config_name = 'captcha_plugin'"; $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 28777a8d24..82ca0fc18d 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -1063,6 +1063,14 @@ class install_update extends module $transfer->write_file($file_struct['filename'], $contents); } break; + + case 'deleted': + + if ($update_mode != 'download') + { + $transfer->rename($file_struct['filename'], $file_struct['filename'] . '.bak'); + } + break; } } } diff --git a/phpBB/install/schemas/schema.json b/phpBB/install/schemas/schema.json index 1a9b9b62b7..b71b1fecbe 100644 --- a/phpBB/install/schemas/schema.json +++ b/phpBB/install/schemas/schema.json @@ -2088,16 +2088,12 @@ "UINT", 0 ], - "pf_phpbb_skype": [ - "VCHAR", - "" - ], - "pf_phpbb_twitter": [ - "VCHAR", + "pf_phpbb_interests": [ + "MTEXT", "" ], - "pf_phpbb_youtube": [ - "VCHAR", + "pf_phpbb_occupation": [ + "MTEXT", "" ], "pf_phpbb_facebook": [ @@ -2108,19 +2104,19 @@ "VCHAR", "" ], - "pf_phpbb_interests": [ - "MTEXT", + "pf_phpbb_icq": [ + "VCHAR", "" ], - "pf_phpbb_occupation": [ - "MTEXT", + "pf_phpbb_location": [ + "VCHAR", "" ], - "pf_phpbb_icq": [ + "pf_phpbb_skype": [ "VCHAR", "" ], - "pf_phpbb_location": [ + "pf_phpbb_twitter": [ "VCHAR", "" ], @@ -2136,6 +2132,10 @@ "VCHAR", "" ], + "pf_phpbb_youtube": [ + "VCHAR", + "" + ], "pf_phpbb_aol": [ "VCHAR", "" @@ -2711,8 +2711,9 @@ 0 ], "topic_first_poster_name": [ - "VCHAR_UNI", - "" + "VCHAR_UNI:255", + "", + "true_sort" ], "topic_first_poster_colour": [ "VCHAR:6", diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 9cc151f728..baabe90f2a 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -70,7 +70,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('browser_check', '1 INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_interval', '10'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_type', 'd'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cache_gc', '7200'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_plugin', 'phpbb_captcha_nogd'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_plugin', 'core.captcha.plugins.nogd'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_foreground_noise', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('captcha_gd_x_grid', '25'); @@ -273,7 +273,7 @@ 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 ('use_system_cron', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-RC3-dev'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-RC5-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'); @@ -813,9 +813,9 @@ INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_len INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_googleplus', 'profilefields.type.googleplus', 'phpbb_googleplus', '20', '3', '255', '', '', '[\w]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 13, 1, 'VIEW_GOOGLEPLUS_PROFILE', 'http://plus.google.com/%s'); # User Notification Options (for first user) -INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, ''); -INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, 'email'); -INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('topic', 0, 2, ''); -INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('topic', 0, 2, 'email'); +INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.post', 0, 2, ''); +INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.post', 0, 2, 'notification.method.email'); +INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.topic', 0, 2, ''); +INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.topic', 0, 2, 'notification.method.email'); # POSTGRES COMMIT # |