aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/database_update.php91
-rw-r--r--phpBB/install/index.php22
-rw-r--r--phpBB/install/install_convert.php3
-rw-r--r--phpBB/install/install_install.php15
-rw-r--r--phpBB/install/install_update.php11
-rw-r--r--phpBB/install/schemas/firebird_schema.sql5
-rw-r--r--phpBB/install/schemas/mssql_schema.sql5
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql3
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql3
-rw-r--r--phpBB/install/schemas/oracle_schema.sql3
-rw-r--r--phpBB/install/schemas/postgres_schema.sql3
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql5
12 files changed, 108 insertions, 61 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 6a90c51109..59274f29ae 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -73,6 +73,10 @@ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update.");
}
+// In case $phpbb_adm_relative_path is not set (in case of an update), use the default.
+$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/';
+$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
+
// Include files
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
@@ -117,18 +121,7 @@ $phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_pat
$phpbb_class_loader_ext->register();
// Set up container
-$phpbb_container = phpbb_create_dumped_container_unless_debug(
- array(
- new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx),
- new phpbb_di_extension_core($phpbb_root_path),
- ),
- array(
- new phpbb_di_pass_collection_pass(),
- new phpbb_di_pass_kernel_pass(),
- ),
- $phpbb_root_path,
- $phpEx
-);
+$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
@@ -152,7 +145,8 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
- foreach ($cache->obtain_hooks() as $hook)
+ $phpbb_hook_finder = $phpbb_container->get('hook_finder');
+ foreach ($phpbb_hook_finder->find() as $hook)
{
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
}
@@ -205,7 +199,7 @@ include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx);
$inline_update = (request_var('type', 0)) ? true : false;
// To let set_config() calls succeed, we need to make the config array available globally
-$config = new phpbb_config_db($db, $cache->get_driver(), CONFIG_TABLE);
+$config = new phpbb_config_db($db, $phpbb_container->get('cache.driver'), CONFIG_TABLE);
set_config(null, null, null, $config);
set_config_count(null, null, null, $config);
@@ -243,7 +237,7 @@ if ($has_global && !$ga_forum_id)
<title><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></title>
- <link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+ <link href="<?php echo htmlspecialchars($phpbb_admin_path); ?>style/admin.css" rel="stylesheet" type="text/css" media="screen" />
</head>
@@ -293,7 +287,7 @@ header('Content-type: text/html; charset=UTF-8');
<title><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></title>
-<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+<link href="<?php echo htmlspecialchars($phpbb_admin_path); ?>style/admin.css" rel="stylesheet" type="text/css" media="screen" />
</head>
@@ -592,7 +586,7 @@ else
add_log('admin', 'LOG_UPDATE_DATABASE', $orig_version, $updates_to_version);
// Now we purge the session table as well as all cache files
-$cache->purge();
+$phpbb_container->get('cache.driver')->purge();
_print_footer();
@@ -1237,9 +1231,12 @@ function database_update_info()
'style_parent_tree' => array('TEXT', ''),
),
REPORTS_TABLE => array(
- 'reported_post_text' => array('MTEXT_UNI', ''),
- 'reported_post_uid' => array('VCHAR:8', ''),
- 'reported_post_bitfield' => array('VCHAR:255', ''),
+ 'reported_post_text' => array('MTEXT_UNI', ''),
+ 'reported_post_uid' => array('VCHAR:8', ''),
+ 'reported_post_bitfield' => array('VCHAR:255', ''),
+ 'reported_post_enable_bbcode' => array('BOOL', 1),
+ 'reported_post_enable_smilies' => array('BOOL', 1),
+ 'reported_post_enable_magic_url' => array('BOOL', 1),
),
),
'change_columns' => array(
@@ -1261,7 +1258,7 @@ function database_update_info()
*****************************************************************************/
function change_database_data(&$no_updates, $version)
{
- global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx, $db_tools;
+ global $db, $db_tools, $errored, $error_ary, $config, $table_prefix, $phpbb_root_path, $phpEx;
$update_helpers = new phpbb_update_helpers();
@@ -1578,8 +1575,6 @@ function change_database_data(&$no_updates, $version)
),
);
- global $db_tools;
-
$statements = $db_tools->perform_schema_changes($changes);
foreach ($statements as $sql)
@@ -2221,26 +2216,41 @@ function change_database_data(&$no_updates, $version)
}
$db->sql_freeresult($result);
- global $db_tools, $table_prefix;
-
- // Recover from potentially broken Q&A CAPTCHA table on firebird
- // Q&A CAPTCHA was uninstallable, so it's safe to remove these
- // without data loss
+ /*
+ * Due to a bug, vanilla phpbb could not create captcha tables
+ * in 3.0.8 on firebird. It was possible for board administrators
+ * to adjust the code to work. If code was manually adjusted by
+ * board administrators, index names would not be the same as
+ * what 3.0.9 and newer expect. This code fragment drops captcha
+ * tables, destroying all entered Q&A captcha configuration, such
+ * that when Q&A is configured next the respective tables will be
+ * created with correct index names.
+ *
+ * If you wish to preserve your Q&A captcha configuration, you can
+ * manually rename indexes to the currently expected name:
+ * phpbb_captcha_questions_lang_iso => phpbb_captcha_questions_lang
+ * phpbb_captcha_answers_question_id => phpbb_captcha_answers_qid
+ *
+ * Again, this needs to be done only if a board was manually modified
+ * to fix broken captcha code.
+ *
if ($db_tools->sql_layer == 'firebird')
{
- $tables = array(
- $table_prefix . 'captcha_questions',
- $table_prefix . 'captcha_answers',
- $table_prefix . 'qa_confirm',
+ $changes = array(
+ 'drop_tables' => array(
+ $table_prefix . 'captcha_questions',
+ $table_prefix . 'captcha_answers',
+ $table_prefix . 'qa_confirm',
+ ),
);
- foreach ($tables as $table)
+ $statements = $db_tools->perform_schema_changes($changes);
+
+ foreach ($statements as $sql)
{
- if ($db_tools->sql_table_exists($table))
- {
- $db_tools->sql_table_drop($table);
- }
+ _sql($sql, $errored, $error_ary);
}
}
+ */
$no_updates = false;
break;
@@ -2950,7 +2960,11 @@ function change_database_data(&$no_updates, $version)
set_config('board_timezone', $update_helpers->convert_phpbb30_timezone($config['board_timezone'], $config['board_dst']));
// After we have calculated the timezones we can delete user_dst column from user table.
- $db_tools->sql_column_remove(USERS_TABLE, 'user_dst');
+ $statements = $db_tools->sql_column_remove(USERS_TABLE, 'user_dst');
+ foreach ($statements as $sql)
+ {
+ _sql($sql, $errored, $error_ary);
+ }
}
if (!isset($config['site_home_url']))
@@ -3046,6 +3060,7 @@ function change_database_data(&$no_updates, $version)
_sql($sql, $errored, $error_ary);
}
$db->sql_freeresult($result);
+
// Add new permissions
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 2be5adaaac..a03fda6395 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -73,6 +73,10 @@ else
}
@ini_set('memory_limit', $mem_limit);
+// In case $phpbb_adm_relative_path is not set (in case of an update), use the default.
+$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/';
+$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
+
// Include essential scripts
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
@@ -97,9 +101,6 @@ $phpbb_container = phpbb_create_install_container($phpbb_root_path, $phpEx);
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
-// set up caching
-$cache = $phpbb_container->get('cache');
-
$phpbb_dispatcher = $phpbb_container->get('dispatcher');
$request = $phpbb_container->get('request');
@@ -195,7 +196,8 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
- foreach ($cache->obtain_hooks() as $hook)
+ $phpbb_hook_finder = $phpbb_container->get('hook_finder');
+ foreach ($phpbb_hook_finder->find() as $hook)
{
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
}
@@ -215,9 +217,9 @@ $phpbb_style_path_provider = new phpbb_style_path_provider();
$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, new phpbb_template_context());
$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template);
$phpbb_style->set_ext_dir_prefix('adm/');
-$phpbb_style->set_custom_style('admin', '../adm/style', array(), '');
+$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
$template->assign_var('T_ASSETS_PATH', '../assets');
-$template->assign_var('T_TEMPLATE_PATH', '../adm/style');
+$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
$install = new module();
@@ -361,7 +363,7 @@ class module
}
define('HEADER_INC', true);
- global $template, $lang, $stage, $phpbb_root_path;
+ global $template, $lang, $stage, $phpbb_root_path, $phpbb_admin_path;
$template->assign_vars(array(
'L_CHANGE' => $lang['CHANGE'],
@@ -370,7 +372,7 @@ class module
'L_SELECT_LANG' => $lang['SELECT_LANG'],
'L_SKIP' => $lang['SKIP'],
'PAGE_TITLE' => $this->get_page_title(),
- 'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/',
+ 'T_IMAGE_PATH' => htmlspecialchars($phpbb_admin_path) . 'images/',
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
'S_CONTENT_FLOW_BEGIN' => ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
@@ -551,7 +553,7 @@ class module
*/
function error($error, $line, $file, $skip = false)
{
- global $lang, $db, $template;
+ global $lang, $db, $template, $phpbb_admin_path;
if ($skip)
{
@@ -573,7 +575,7 @@ class module
echo '<head>';
echo '<meta charset="utf-8">';
echo '<title>' . $lang['INST_ERR_FATAL'] . '</title>';
- echo '<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
+ echo '<link href="' . htmlspecialchars($phpbb_admin_path) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
echo '</head>';
echo '<body id="errorpage">';
echo '<div id="wrap">';
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index 9afe341ffa..15202768b8 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -1538,6 +1538,7 @@ class install_convert extends module
function finish_conversion()
{
global $db, $phpbb_root_path, $phpEx, $convert, $config, $language, $user, $template;
+ global $cache, $auth;
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . "
WHERE config_name = 'convert_progress'
@@ -1547,7 +1548,7 @@ class install_convert extends module
$db->sql_query('DELETE FROM ' . SESSIONS_TABLE);
@unlink($phpbb_root_path . 'cache/data_global.' . $phpEx);
- cache_moderators();
+ phpbb_cache_moderators($db, $cache, $auth);
// And finally, add a note to the log
add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']);
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 14f6ca30fb..1ab9caee0a 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -52,12 +52,13 @@ class install_install extends module
function main($mode, $sub)
{
- global $lang, $template, $language, $phpbb_root_path, $cache;
+ global $lang, $template, $language, $phpbb_root_path, $phpEx;
+ global $phpbb_container, $cache;
switch ($sub)
{
case 'intro':
- $cache->purge();
+ $phpbb_container->get('cache.driver')->purge();
$this->page_title = $lang['SUB_INTRO'];
@@ -101,6 +102,12 @@ class install_install extends module
break;
case 'final':
+ // Create a normal container now
+ $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
+
+ // Sets the global $cache variable
+ $cache = $phpbb_container->get('cache');
+
$this->build_search_index($mode, $sub);
$this->add_modules($mode, $sub);
$this->add_language($mode, $sub);
@@ -1807,7 +1814,7 @@ class install_install extends module
*/
function email_admin($mode, $sub)
{
- global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpEx;
+ global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$this->page_title = $lang['STAGE_FINAL'];
@@ -1854,7 +1861,7 @@ class install_install extends module
'TITLE' => $lang['INSTALL_CONGRATS'],
'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&amp;language=' . $data['language']), '../docs/README.html'),
'L_SUBMIT' => $lang['INSTALL_LOGIN'],
- 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx, 'i=send_statistics&amp;mode=send_statistics'),
+ 'U_ACTION' => append_sid($phpbb_admin_path . 'index.' . $phpEx, 'i=send_statistics&amp;mode=send_statistics'),
));
}
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index 53f9c52556..bfceed6b17 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -72,7 +72,7 @@ class install_update extends module
function main($mode, $sub)
{
global $phpbb_style, $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language;
- global $request;
+ global $request, $phpbb_admin_path, $phpbb_adm_relative_path;
$this->tpl_name = 'install_update';
$this->page_title = 'UPDATE_INSTALLATION';
@@ -132,7 +132,7 @@ class install_update extends module
}
// Set custom template again. ;)
- $phpbb_style->set_custom_style('admin', '../adm/style', array(), '');
+ $phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
$template->assign_vars(array(
'S_USER_LANG' => $user->lang['USER_LANG'],
@@ -217,7 +217,7 @@ class install_update extends module
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
- if (in_array('adm/style/install_update.html', $this->update_info['files']))
+ if (in_array($phpbb_adm_relative_path . 'style/install_update.html', $this->update_info['files']))
{
$this->tpl_name = '../../install/update/new/adm/style/install_update';
}
@@ -494,6 +494,7 @@ class install_update extends module
$template->assign_vars(array(
'S_FILE_CHECK' => true,
'S_ALL_UP_TO_DATE' => $all_up_to_date,
+ 'L_ALL_FILES_UP_TO_DATE' => $user->lang('ALL_FILES_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&amp;redirect=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')),
'S_VERSION_UP_TO_DATE' => $up_to_date,
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&amp;mode=$mode&amp;sub=file_check"),
'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&amp;mode=$mode&amp;sub=update_files"),
@@ -1078,12 +1079,12 @@ class install_update extends module
*/
function show_diff(&$update_list)
{
- global $phpbb_root_path, $template, $user;
+ global $phpbb_root_path, $template, $user, $phpbb_adm_relative_path;
$this->tpl_name = 'install_update_diff';
// Got the diff template itself updated? If so, we are able to directly use it
- if (in_array('adm/style/install_update_diff.html', $this->update_info['files']))
+ if (in_array($phpbb_adm_relative_path . 'style/install_update_diff.html', $this->update_info['files']))
{
$this->tpl_name = '../../install/update/new/adm/style/install_update_diff';
}
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 260b75947a..d654193d7b 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -950,7 +950,10 @@ CREATE TABLE phpbb_reports (
report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
reported_post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
reported_post_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
- reported_post_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
+ reported_post_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ reported_post_enable_magic_url INTEGER DEFAULT 1 NOT NULL,
+ reported_post_enable_smilies INTEGER DEFAULT 1 NOT NULL,
+ reported_post_enable_bbcode INTEGER DEFAULT 1 NOT NULL
);;
ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);;
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index aa9766f91f..30016e43b1 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -1159,7 +1159,10 @@ CREATE TABLE [phpbb_reports] (
[report_text] [text] DEFAULT ('') NOT NULL ,
[reported_post_text] [text] DEFAULT ('') NOT NULL ,
[reported_post_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
- [reported_post_bitfield] [varchar] (255) DEFAULT ('') NOT NULL
+ [reported_post_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [reported_post_enable_magic_url] [int] DEFAULT (1) NOT NULL ,
+ [reported_post_enable_smilies] [int] DEFAULT (1) NOT NULL ,
+ [reported_post_enable_bbcode] [int] DEFAULT (1) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index ebadc93f05..fef5357d2a 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -675,6 +675,9 @@ CREATE TABLE phpbb_reports (
reported_post_text mediumblob NOT NULL,
reported_post_uid varbinary(8) DEFAULT '' NOT NULL,
reported_post_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ reported_post_enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ reported_post_enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ reported_post_enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (report_id),
KEY post_id (post_id),
KEY pm_id (pm_id)
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index ff46c13fef..a797c36c20 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -675,6 +675,9 @@ CREATE TABLE phpbb_reports (
reported_post_text mediumtext NOT NULL,
reported_post_uid varchar(8) DEFAULT '' NOT NULL,
reported_post_bitfield varchar(255) DEFAULT '' NOT NULL,
+ reported_post_enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ reported_post_enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ reported_post_enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (report_id),
KEY post_id (post_id),
KEY pm_id (pm_id)
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 7a285c6d55..8932f04820 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -1266,6 +1266,9 @@ CREATE TABLE phpbb_reports (
reported_post_text clob DEFAULT '' ,
reported_post_uid varchar2(8) DEFAULT '' ,
reported_post_bitfield varchar2(255) DEFAULT '' ,
+ reported_post_enable_magic_url number(1) DEFAULT '1' NOT NULL,
+ reported_post_enable_smilies number(1) DEFAULT '1' NOT NULL,
+ reported_post_enable_bbcode number(1) DEFAULT '1' NOT NULL,
CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
)
/
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 1035dd1ce8..426f2decbf 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -887,6 +887,9 @@ CREATE TABLE phpbb_reports (
reported_post_text TEXT DEFAULT '' NOT NULL,
reported_post_uid varchar(8) DEFAULT '' NOT NULL,
reported_post_bitfield varchar(255) DEFAULT '' NOT NULL,
+ reported_post_enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_magic_url >= 0),
+ reported_post_enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_smilies >= 0),
+ reported_post_enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_bbcode >= 0),
PRIMARY KEY (report_id)
);
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 3586a9040d..fb6797deb6 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -654,7 +654,10 @@ CREATE TABLE phpbb_reports (
report_text mediumtext(16777215) NOT NULL DEFAULT '',
reported_post_text mediumtext(16777215) NOT NULL DEFAULT '',
reported_post_uid varchar(8) NOT NULL DEFAULT '',
- reported_post_bitfield varchar(255) NOT NULL DEFAULT ''
+ reported_post_bitfield varchar(255) NOT NULL DEFAULT '',
+ reported_post_enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ reported_post_enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ reported_post_enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1'
);
CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);