aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php30
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php105
-rw-r--r--phpBB/install/database_update.php16
-rw-r--r--phpBB/install/index.php4
-rw-r--r--phpBB/install/install_convert.php14
-rw-r--r--phpBB/install/install_install.php4
-rw-r--r--phpBB/install/install_update.php2
-rw-r--r--phpBB/install/schemas/firebird_schema.sql42
-rw-r--r--phpBB/install/schemas/mssql_schema.sql74
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql40
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql40
-rw-r--r--phpBB/install/schemas/oracle_schema.sql56
-rw-r--r--phpBB/install/schemas/postgres_schema.sql48
-rw-r--r--phpBB/install/schemas/schema_data.sql11
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql40
15 files changed, 337 insertions, 189 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index 4532ecb609..dd4ef13e49 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -33,7 +33,7 @@ $dbms = phpbb_convert_30_dbms_to_31($dbms);
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3',
- 'phpbb_version' => '3.1.0-dev',
+ 'phpbb_version' => '3.1.0-a2',
'author' => '<a href="https://www.phpbb.com/">phpBB Group</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
@@ -136,7 +136,7 @@ $config_schema = array(
'avatar_max_width' => 'avatar_max_width',
'avatar_max_height' => 'avatar_max_height',
'default_dateformat' => 'phpbb_set_encoding(default_dateformat)',
- 'board_timezone' => 'board_timezone',
+ 'board_timezone' => 'phpbb_convert_timezone(board_timezone)',
'allow_privmsg' => 'not(privmsg_disable)',
'gzip_compress' => 'gzip_compress',
'coppa_enable' => '!is_empty(coppa_mail)',
@@ -341,6 +341,9 @@ if (!$get_info)
update_folder_pm_count();
', '
update_unread_count();
+ ', (defined('MOD_ATTACHMENT')) ? '
+ phpbb_attachment_extension_group_name();
+ ' : '
', '
phpbb_convert_authentication(\'start\');
', '
@@ -399,7 +402,7 @@ if (!$get_info)
array('is_orphan', 0, ''),
array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'),
array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'),
- array('real_filename', 'attachments_desc.real_filename', ''),
+ array('real_filename', 'attachments_desc.real_filename', 'phpbb_set_encoding'),
array('download_count', 'attachments_desc.download_count', ''),
array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
array('extension', 'attachments_desc.extension', ''),
@@ -497,7 +500,7 @@ if (!$get_info)
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
array('topic_time', 'topics.topic_time', ''),
array('topic_views', 'topics.topic_views', ''),
- array('topic_posts_approved', 'topics.topic_replies + 1', ''),
+ array('topic_posts_approved', 'topics.topic_replies', 'phpbb_topic_replies_to_posts'),
array('topic_posts_unapproved', 0, ''),
array('topic_posts_softdeleted',0, ''),
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
@@ -506,6 +509,8 @@ if (!$get_info)
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('topic_visibility', ITEM_APPROVED, ''),
+
array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'htmlspecialchars_decode', 'function4' => 'utf8_htmlspecialchars')),
array('poll_start', 'vote_desc.vote_start', 'null_to_zero'),
array('poll_length', 'vote_desc.vote_length', 'null_to_zero'),
@@ -531,7 +536,7 @@ if (!$get_info)
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
array('topic_time', 'topics.topic_time', ''),
array('topic_views', 'topics.topic_views', ''),
- array('topic_posts_approved', 'topics.topic_replies + 1', ''),
+ array('topic_posts_approved', 'topics.topic_replies', 'phpbb_topic_replies_to_posts'),
array('topic_posts_unapproved', 0, ''),
array('topic_posts_softdeleted',0, ''),
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
@@ -539,6 +544,7 @@ if (!$get_info)
array('topic_moved_id', 'topics.topic_moved_id', ''),
array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'),
array('topic_first_post_id', 'topics.topic_first_post_id', ''),
+ array('topic_visibility', ITEM_APPROVED, ''),
array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'htmlspecialchars_decode', 'function4' => 'utf8_htmlspecialchars')),
array('poll_start', 'vote_desc.vote_start', 'null_to_zero'),
@@ -646,6 +652,7 @@ if (!$get_info)
array('post_edit_count', 'posts.post_edit_count', ''),
array('post_edit_reason', '', ''),
array('post_edit_user', '', 'phpbb_post_edit_user'),
+ array('post_visibility', ITEM_APPROVED, ''),
array('bbcode_uid', 'posts.post_time', 'make_uid'),
array('post_text', 'posts_text.post_text', 'phpbb_prepare_message'),
@@ -821,7 +828,10 @@ if (!$get_info)
array(
'target' => GROUPS_TABLE,
'autoincrement' => 'group_id',
- 'query_first' => array('target', $convert->truncate_statement . GROUPS_TABLE),
+ 'query_first' => array(
+ array('target', $convert->truncate_statement . GROUPS_TABLE),
+ array('target', $convert->truncate_statement . TEAMPAGE_TABLE),
+ ),
array('group_id', 'groups.group_id', ''),
array('group_type', 'groups.group_type', 'phpbb_convert_group_type'),
@@ -838,6 +848,7 @@ if (!$get_info)
'query_first' => array('target', $convert->truncate_statement . USER_GROUP_TABLE),
'execute_first' => '
add_default_groups();
+ add_groups_to_teampage();
',
array('group_id', 'groups.group_id', ''),
@@ -865,7 +876,8 @@ if (!$get_info)
'autoincrement' => 'user_id',
'query_first' => array(
array('target', 'DELETE FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS),
- array('target', $convert->truncate_statement . BOTS_TABLE)
+ array('target', $convert->truncate_statement . BOTS_TABLE),
+ array('target', $convert->truncate_statement . USER_NOTIFICATIONS_TABLE),
),
'execute_last' => '
@@ -889,7 +901,7 @@ if (!$get_info)
array('user_lastmark', 'users.user_lastvisit', 'intval'),
array('user_lang', $config['default_lang'], ''),
array('', 'users.user_lang', ''),
- array('user_timezone', 'users.user_timezone', 'floatval'),
+ array('user_timezone', 'users.user_timezone', 'phpbb_convert_timezone'),
array('user_dateformat', 'users.user_dateformat', array('function1' => 'phpbb_set_encoding', 'function2' => 'fill_dateformat')),
array('user_inactive_reason', '', 'phpbb_inactive_reason'),
array('user_inactive_time', '', 'phpbb_inactive_time'),
@@ -938,6 +950,8 @@ if (!$get_info)
array('user_sig_bbcode_bitfield', '', 'get_bbcode_bitfield'),
array('', 'users.user_regdate AS post_time', ''),
+ array('', 'users.user_notify_pm', 'phpbb_add_notification_options'),
+
'where' => 'users.user_id <> -1',
),
),
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index a698f0ef13..29e5f7ab09 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -540,6 +540,15 @@ function phpbb_user_id($user_id)
return (int) $user_id;
}
+/**
+* Return correct user id value
+* Everyone's id will be one higher to allow the guest/anonymous user to have a positive id as well
+*/
+function phpbb_topic_replies_to_posts($num_replies)
+{
+ return (int) $num_replies + 1;
+}
+
/* Copy additional table fields from old forum to new forum if user wants this (for Mod compatibility for example)
function phpbb_copy_table_fields()
{
@@ -1406,6 +1415,55 @@ function phpbb_attachment_category($cat_id)
}
/**
+* Convert the attachment extension names
+* This is only used if the Attachment MOD was installed
+*/
+function phpbb_attachment_extension_group_name()
+{
+ global $db, $phpbb_root_path, $phpEx;
+
+ // Update file extension group names to use language strings.
+ $sql = 'SELECT lang_dir
+ FROM ' . LANG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $extension_groups_updated = array();
+ while ($lang_dir = $db->sql_fetchfield('lang_dir'))
+ {
+ $lang_dir = basename($lang_dir);
+ $lang_file = $phpbb_root_path . 'language/' . $lang_dir . '/acp/attachments.' . $phpEx;
+
+ if (!file_exists($lang_file))
+ {
+ continue;
+ }
+
+ $lang = array();
+ include($lang_file);
+
+ foreach ($lang as $lang_key => $lang_val)
+ {
+ if (isset($extension_groups_updated[$lang_key]) || strpos($lang_key, 'EXT_GROUP_') !== 0)
+ {
+ continue;
+ }
+
+ $sql_ary = array(
+ 'group_name' => substr($lang_key, 10), // Strip off 'EXT_GROUP_'
+ );
+
+ $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE group_name = '" . $db->sql_escape($lang_val) . "'";
+ $db->sql_query($sql);
+
+ $extension_groups_updated[$lang_key] = true;
+ }
+ }
+ $db->sql_freeresult($result);
+}
+
+/**
* Obtain list of forums in which different attachment categories can be used
*/
function phpbb_attachment_forum_perms($forum_permissions)
@@ -1868,3 +1926,50 @@ function phpbb_check_username_collisions()
$drop_sql = 'DROP TABLE ' . USERCONV_TABLE;
$db->sql_query($drop_sql);
}
+
+function phpbb_convert_timezone($timezone)
+{
+ global $config, $db, $phpbb_root_path, $phpEx, $table_prefix;
+ $timezone_migration = new \phpbb\db\migration\data\v310\timezone($config, $db, new \phpbb\db\tools($db), $phpbb_root_path, $phpEx, $table_prefix);
+ return $timezone_migration->convert_phpbb30_timezone($timezone, 0);
+}
+
+function phpbb_add_notification_options($user_notify_pm)
+{
+ global $convert_row, $db;
+
+ $user_id = phpbb_user_id($convert_row['user_id']);
+ if ($user_id == ANONYMOUS)
+ {
+ return;
+ }
+
+ $rows = array();
+
+ $rows[] = array(
+ 'item_type' => 'post',
+ 'item_id' => 0,
+ 'user_id' => (int) $user_id,
+ 'notify' => 1,
+ 'method' => 'email',
+ );
+ $rows[] = array(
+ 'item_type' => 'topic',
+ 'item_id' => 0,
+ 'user_id' => (int) $user_id,
+ 'notify' => 1,
+ 'method' => 'email',
+ );
+ if ($user_notify_pm)
+ {
+ $rows[] = array(
+ 'item_type' => 'pm',
+ 'item_id' => 0,
+ 'user_id' => (int) $user_id,
+ 'notify' => 1,
+ 'method' => 'email',
+ );
+ }
+
+ $sql = $db->sql_multi_insert(USER_NOTIFICATIONS_TABLE, $rows);
+}
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index fa8ec6b6ce..b79420ab71 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -207,6 +207,8 @@ $safe_time_limit = (ini_get('max_execution_time') / 2);
while (!$migrator->finished())
{
+ $migration_start_time = microtime(true);
+
try
{
$migrator->update();
@@ -227,20 +229,26 @@ while (!$migrator->finished())
if (isset($migrator->last_run_migration['effectively_installed']) && $migrator->last_run_migration['effectively_installed'])
{
- echo $user->lang('MIGRATION_EFFECTIVELY_INSTALLED', $migrator->last_run_migration['name']) . '<br />';
+ echo $user->lang('MIGRATION_EFFECTIVELY_INSTALLED', $migrator->last_run_migration['name']);
}
else
{
- if ($state['migration_data_done'])
+ if ($migrator->last_run_migration['task'] == 'process_data_step' && $state['migration_data_done'])
+ {
+ echo $user->lang('MIGRATION_DATA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time));
+ }
+ else if ($migrator->last_run_migration['task'] == 'process_data_step')
{
- echo $user->lang('MIGRATION_DATA_DONE', $migrator->last_run_migration['name']) . '<br />';
+ echo $user->lang('MIGRATION_DATA_IN_PROGRESS', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time));
}
else if ($state['migration_schema_done'])
{
- echo $user->lang('MIGRATION_SCHEMA_DONE', $migrator->last_run_migration['name']) . '<br />';
+ echo $user->lang('MIGRATION_SCHEMA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time));
}
}
+ echo "<br />\n";
+
// Are we approaching the time limit? If so we want to pause the update and continue after refreshing
if ((time() - $update_start_time) >= $safe_time_limit)
{
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 161dc78173..2e09e95ea7 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -244,6 +244,8 @@ $config = new \phpbb\config\config(array(
'load_tplcompile' => '1'
));
+$symfony_request = $phpbb_container->get('symfony_request');
+$phpbb_filesystem = $phpbb_container->get('filesystem');
$phpbb_path_helper = $phpbb_container->get('path_helper');
$template = new \phpbb\template\twig\twig($phpbb_path_helper, $config, $user, new \phpbb\template\context());
$paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style');
@@ -689,7 +691,7 @@ class module
/**
* Generate the relevant HTML for an input field and the associated label and explanatory text
*/
- function input_field($name, $type, $value='', $options='')
+ function input_field($name, $type, $value = '', $options = '')
{
global $lang;
$tpl_type = explode(':', $type);
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index 4d3e1d3d4a..1c7e2dca76 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -90,13 +90,21 @@ class install_convert extends module
function main($mode, $sub)
{
global $lang, $template, $phpbb_root_path, $phpEx, $cache, $config, $language, $table_prefix;
- global $convert;
+ global $convert, $request, $phpbb_container;
$this->tpl_name = 'install_convert';
$this->mode = $mode;
$convert = new convert($this->p_master);
+ // Enable super globals to prevent issues with the new \phpbb\request\request object
+ $request->enable_super_globals();
+ // Create a normal container now
+ $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
+
+ // Create cache
+ $cache = $phpbb_container->get('cache');
+
switch ($sub)
{
case 'intro':
@@ -418,6 +426,7 @@ class install_convert extends module
{
$error[] = sprintf($lang['TABLE_PREFIX_SAME'], $src_table_prefix);
}
+ $src_dbms = phpbb_convert_30_dbms_to_31($src_dbms);
// Check table prefix
if (!sizeof($error))
@@ -1537,7 +1546,7 @@ class install_convert extends module
function finish_conversion()
{
global $db, $phpbb_root_path, $phpEx, $convert, $config, $language, $user, $template;
- global $cache, $auth;
+ global $cache, $auth, $phpbb_container, $phpbb_log;
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . "
WHERE config_name = 'convert_progress'
@@ -1550,6 +1559,7 @@ class install_convert extends module
phpbb_cache_moderators($db, $cache, $auth);
// And finally, add a note to the log
+ $phpbb_log = $phpbb_container->get('log');
add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']);
$url = $this->p_master->module_url . "?mode={$this->mode}&amp;sub=final&amp;language=$language";
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index c273660d08..1a7e1d1094 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1322,6 +1322,10 @@ class install_install extends module
SET config_value = '" . md5(mt_rand()) . "'
WHERE config_name = 'avatar_salt'",
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . md5(mt_rand()) . "'
+ WHERE config_name = 'plupload_salt'",
+
'UPDATE ' . $data['table_prefix'] . "users
SET username = '" . $db->sql_escape($data['admin_name']) . "', user_password='" . $db->sql_escape(md5($data['admin_pass1'])) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($data['default_lang']) . "', user_email='" . $db->sql_escape($data['board_email']) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . $db->sql_escape(phpbb_email_hash($data['board_email'])) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($data['admin_name'])) . "'
WHERE username = 'Admin'",
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index b7b358ab2f..dc6e57c851 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -1311,7 +1311,7 @@ class install_update extends module
}
}*/
- if (file_exists($phpbb_root_path . dirname($file)) || (strpos($file, 'styles/') !== 0 && strpos($file, 'language/') !== 0))
+ if (!phpbb_ignore_new_file_on_update($phpbb_root_path, $file))
{
$this->get_custom_info($update_list['new'], $file);
$update_list['new'][] = array('filename' => $file, 'custom' => false);
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index a90a60e7d0..9cf6d877ad 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -128,27 +128,6 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);;
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);;
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);;
-# Table: 'phpbb_oauth_tokens'
-CREATE TABLE phpbb_oauth_tokens (
- user_id INTEGER DEFAULT 0 NOT NULL,
- session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
- provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- oauth_token BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
-);;
-
-CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens(user_id);;
-CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens(provider);;
-
-# Table: 'phpbb_oauth_accounts'
-CREATE TABLE phpbb_oauth_accounts (
- user_id INTEGER DEFAULT 0 NOT NULL,
- provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- oauth_provider_id BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_oauth_accounts ADD PRIMARY KEY (user_id, provider);;
-
-
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id INTEGER NOT NULL,
@@ -714,6 +693,27 @@ BEGIN
END;;
+# Table: 'phpbb_oauth_accounts'
+CREATE TABLE phpbb_oauth_accounts (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ oauth_provider_id BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_oauth_accounts ADD PRIMARY KEY (user_id, provider);;
+
+
+# Table: 'phpbb_oauth_tokens'
+CREATE TABLE phpbb_oauth_tokens (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ oauth_token BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens(user_id);;
+CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens(provider);;
+
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id INTEGER DEFAULT 0 NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index a9ebaeb990..644b50cbda 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -167,43 +167,6 @@ GO
/*
- Table: 'phpbb_oauth_tokens'
-*/
-CREATE TABLE [phpbb_oauth_tokens] (
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [session_id] [char] (32) DEFAULT ('') NOT NULL ,
- [provider] [varchar] (255) DEFAULT ('') NOT NULL ,
- [oauth_token] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
-
-CREATE INDEX [user_id] ON [phpbb_oauth_tokens]([user_id]) ON [PRIMARY]
-GO
-
-CREATE INDEX [provider] ON [phpbb_oauth_tokens]([provider]) ON [PRIMARY]
-GO
-
-
-/*
- Table: 'phpbb_oauth_accounts'
-*/
-CREATE TABLE [phpbb_oauth_accounts] (
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [provider] [varchar] (255) DEFAULT ('') NOT NULL ,
- [oauth_provider_id] [varchar] (4000) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
-
-ALTER TABLE [phpbb_oauth_accounts] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_oauth_accounts] PRIMARY KEY CLUSTERED
- (
- [user_id],
- [provider]
- ) ON [PRIMARY]
-GO
-
-
-/*
Table: 'phpbb_banlist'
*/
CREATE TABLE [phpbb_banlist] (
@@ -880,6 +843,43 @@ GO
/*
+ Table: 'phpbb_oauth_accounts'
+*/
+CREATE TABLE [phpbb_oauth_accounts] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [provider] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [oauth_provider_id] [varchar] (4000) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_oauth_accounts] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_oauth_accounts] PRIMARY KEY CLUSTERED
+ (
+ [user_id],
+ [provider]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_oauth_tokens'
+*/
+CREATE TABLE [phpbb_oauth_tokens] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [session_id] [char] (32) DEFAULT ('') NOT NULL ,
+ [provider] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [oauth_token] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_oauth_tokens]([user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [provider] ON [phpbb_oauth_tokens]([provider]) ON [PRIMARY]
+GO
+
+
+/*
Table: 'phpbb_poll_options'
*/
CREATE TABLE [phpbb_poll_options] (
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index c3bce73e50..fc8bb769d4 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -90,26 +90,6 @@ CREATE TABLE phpbb_acl_users (
);
-# Table: 'phpbb_oauth_tokens'
-CREATE TABLE phpbb_oauth_tokens (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- session_id binary(32) DEFAULT '' NOT NULL,
- provider varbinary(255) DEFAULT '' NOT NULL,
- oauth_token mediumblob NOT NULL,
- KEY user_id (user_id),
- KEY provider (provider)
-);
-
-
-# Table: 'phpbb_oauth_accounts'
-CREATE TABLE phpbb_oauth_accounts (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- provider varbinary(255) DEFAULT '' NOT NULL,
- oauth_provider_id blob NOT NULL,
- PRIMARY KEY (user_id, provider)
-);
-
-
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
@@ -499,6 +479,26 @@ CREATE TABLE phpbb_notifications (
);
+# Table: 'phpbb_oauth_accounts'
+CREATE TABLE phpbb_oauth_accounts (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ provider varbinary(255) DEFAULT '' NOT NULL,
+ oauth_provider_id blob NOT NULL,
+ PRIMARY KEY (user_id, provider)
+);
+
+
+# Table: 'phpbb_oauth_tokens'
+CREATE TABLE phpbb_oauth_tokens (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_id binary(32) DEFAULT '' NOT NULL,
+ provider varbinary(255) DEFAULT '' NOT NULL,
+ oauth_token mediumblob NOT NULL,
+ KEY user_id (user_id),
+ KEY provider (provider)
+);
+
+
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index d538564740..60f3dd4c68 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -90,26 +90,6 @@ CREATE TABLE phpbb_acl_users (
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-# Table: 'phpbb_oauth_tokens'
-CREATE TABLE phpbb_oauth_tokens (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- session_id char(32) DEFAULT '' NOT NULL,
- provider varchar(255) DEFAULT '' NOT NULL,
- oauth_token mediumtext NOT NULL,
- KEY user_id (user_id),
- KEY provider (provider)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_oauth_accounts'
-CREATE TABLE phpbb_oauth_accounts (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- provider varchar(255) DEFAULT '' NOT NULL,
- oauth_provider_id text NOT NULL,
- PRIMARY KEY (user_id, provider)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
@@ -499,6 +479,26 @@ CREATE TABLE phpbb_notifications (
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+# Table: 'phpbb_oauth_accounts'
+CREATE TABLE phpbb_oauth_accounts (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ provider varchar(255) DEFAULT '' NOT NULL,
+ oauth_provider_id text NOT NULL,
+ PRIMARY KEY (user_id, provider)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_oauth_tokens'
+CREATE TABLE phpbb_oauth_tokens (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_id char(32) DEFAULT '' NOT NULL,
+ provider varchar(255) DEFAULT '' NOT NULL,
+ oauth_token mediumtext NOT NULL,
+ KEY user_id (user_id),
+ KEY provider (provider)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 4cd8aabd67..af3ff02f8d 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -211,34 +211,6 @@ CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id)
/
/*
- Table: 'phpbb_oauth_tokens'
-*/
-CREATE TABLE phpbb_oauth_tokens (
- user_id number(8) DEFAULT '0' NOT NULL,
- session_id char(32) DEFAULT '' ,
- provider varchar2(255) DEFAULT '' ,
- oauth_token clob DEFAULT ''
-)
-/
-
-CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id)
-/
-CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider)
-/
-
-/*
- Table: 'phpbb_oauth_accounts'
-*/
-CREATE TABLE phpbb_oauth_accounts (
- user_id number(8) DEFAULT '0' NOT NULL,
- provider varchar2(255) DEFAULT '' ,
- oauth_provider_id clob DEFAULT '' ,
- CONSTRAINT pk_phpbb_oauth_accounts PRIMARY KEY (user_id, provider)
-)
-/
-
-
-/*
Table: 'phpbb_banlist'
*/
CREATE TABLE phpbb_banlist (
@@ -964,6 +936,34 @@ END;
/*
+ Table: 'phpbb_oauth_accounts'
+*/
+CREATE TABLE phpbb_oauth_accounts (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ provider varchar2(255) DEFAULT '' ,
+ oauth_provider_id clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_oauth_accounts PRIMARY KEY (user_id, provider)
+)
+/
+
+
+/*
+ Table: 'phpbb_oauth_tokens'
+*/
+CREATE TABLE phpbb_oauth_tokens (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ session_id char(32) DEFAULT '' ,
+ provider varchar2(255) DEFAULT '' ,
+ oauth_token clob DEFAULT ''
+)
+/
+
+CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id)
+/
+CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider)
+/
+
+/*
Table: 'phpbb_poll_options'
*/
CREATE TABLE phpbb_poll_options (
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index c1eabdf1ee..6806639a35 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -189,30 +189,6 @@ CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
/*
- Table: 'phpbb_oauth_tokens'
-*/
-CREATE TABLE phpbb_oauth_tokens (
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- session_id char(32) DEFAULT '' NOT NULL,
- provider varchar(255) DEFAULT '' NOT NULL,
- oauth_token TEXT DEFAULT '' NOT NULL
-);
-
-CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
-CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
-
-/*
- Table: 'phpbb_oauth_accounts'
-*/
-CREATE TABLE phpbb_oauth_accounts (
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- provider varchar(255) DEFAULT '' NOT NULL,
- oauth_provider_id varchar(4000) DEFAULT '' NOT NULL,
- PRIMARY KEY (user_id, provider)
-);
-
-
-/*
Table: 'phpbb_banlist'
*/
CREATE SEQUENCE phpbb_banlist_seq;
@@ -682,6 +658,30 @@ CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification
CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read);
/*
+ Table: 'phpbb_oauth_accounts'
+*/
+CREATE TABLE phpbb_oauth_accounts (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ provider varchar(255) DEFAULT '' NOT NULL,
+ oauth_provider_id varchar(4000) DEFAULT '' NOT NULL,
+ PRIMARY KEY (user_id, provider)
+);
+
+
+/*
+ Table: 'phpbb_oauth_tokens'
+*/
+CREATE TABLE phpbb_oauth_tokens (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ session_id char(32) DEFAULT '' NOT NULL,
+ provider varchar(255) DEFAULT '' NOT NULL,
+ oauth_token TEXT DEFAULT '' NOT NULL
+);
+
+CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
+CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
+
+/*
Table: 'phpbb_poll_options'
*/
CREATE TABLE phpbb_poll_options (
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 70138f35fd..8a16526f36 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -17,6 +17,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remot
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_birthdays', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_cdn', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_password_reset', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1');
@@ -176,7 +177,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofi
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_cdn', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');
@@ -222,6 +222,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('new_member_post_li
INSERT INTO phpbb_config (config_name, config_value) VALUES ('new_member_group_default', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pass_complex', 'PASS_TYPE_ANY');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('plupload_salt', 'phpbb_plupload');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_edit_time', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_boxes', '4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_msgs', '50');
@@ -230,6 +231,8 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page', '
INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '60');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_expire_days', '30');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_gc', '86400');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '');
@@ -237,7 +240,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_block_size'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_gc', '7200');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_interval', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_anonymous_interval', '0');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_type', 'phpbb\search\fulltext_native');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_type', '\phpbb\search\fulltext_native');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_store_results', '1800');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_allow_deny', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_allow_empty_referer', '1');
@@ -266,7 +269,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-dev');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-a3-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');
@@ -281,8 +284,10 @@ INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_fi
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_posts', '1', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_topics', '1', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_users', '1', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('plupload_last_gc', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed_last_update', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('read_notification_last_gc', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_date', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_users', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('search_indexing_state', '', 1);
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index d55aead9b2..05262787c0 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -89,26 +89,6 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
-# Table: 'phpbb_oauth_tokens'
-CREATE TABLE phpbb_oauth_tokens (
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- session_id char(32) NOT NULL DEFAULT '',
- provider varchar(255) NOT NULL DEFAULT '',
- oauth_token mediumtext(16777215) NOT NULL DEFAULT ''
-);
-
-CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
-CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
-
-# Table: 'phpbb_oauth_accounts'
-CREATE TABLE phpbb_oauth_accounts (
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- provider varchar(255) NOT NULL DEFAULT '',
- oauth_provider_id text(65535) NOT NULL DEFAULT '',
- PRIMARY KEY (user_id, provider)
-);
-
-
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id INTEGER PRIMARY KEY NOT NULL ,
@@ -484,6 +464,26 @@ CREATE TABLE phpbb_notifications (
CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification_type_id, item_id);
CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read);
+# Table: 'phpbb_oauth_accounts'
+CREATE TABLE phpbb_oauth_accounts (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ provider varchar(255) NOT NULL DEFAULT '',
+ oauth_provider_id text(65535) NOT NULL DEFAULT '',
+ PRIMARY KEY (user_id, provider)
+);
+
+
+# Table: 'phpbb_oauth_tokens'
+CREATE TABLE phpbb_oauth_tokens (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_id char(32) NOT NULL DEFAULT '',
+ provider varchar(255) NOT NULL DEFAULT '',
+ oauth_token mediumtext(16777215) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
+CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
+
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id tinyint(4) NOT NULL DEFAULT '0',