diff options
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/database_update.php | 21 | ||||
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 2 |
8 files changed, 28 insertions, 7 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index c3f8b40de6..98f0596835 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -676,6 +676,10 @@ function database_update_info() 'forum_style' => array('UINT', 0), ), ), + 'change_columns' => array( + USERS_TABLE => array( + 'user_options' => array('UINT:11', 230271), + ), ), // No changes from 3.0.5-RC1 to 3.0.5 @@ -1279,6 +1283,23 @@ function change_database_data(&$no_updates, $version) set_config('allow_quick_reply', '1'); } + // Set every members user_options column to enable + // bbcode, smilies and URLs for signatures by default + $sql = 'SELECT user_options + FROM ' . USERS_TABLE . ' + WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')'; + $result = $db->sql_query_limit($sql, 1); + $user_option = (int) $db->sql_fetchfield('user_options'); + $db->sql_freeresult($result); + + // Check if we already updated the database by checking bit 15 which we used to store the sig_bbcode option + if (!($user_option & 1 << 15)) + { + // 229376 is the added value to enable all three signature options + $sql = 'UPDATE ' . USERS_TABLE . ' SET user_options = user_options + 229376'; + _sql($sql, $errored, $error_ary); + } + $no_updates = false; break; } diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index a472aac421..4bbc147df7 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -1346,7 +1346,7 @@ CREATE TABLE phpbb_users ( user_allow_viewonline INTEGER DEFAULT 1 NOT NULL, user_allow_viewemail INTEGER DEFAULT 1 NOT NULL, user_allow_massemail INTEGER DEFAULT 1 NOT NULL, - user_options INTEGER DEFAULT 895 NOT NULL, + user_options INTEGER DEFAULT 230271 NOT NULL, user_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, user_avatar_type INTEGER DEFAULT 0 NOT NULL, user_avatar_width INTEGER DEFAULT 0 NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 1b3323072e..e2cc49e4d7 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1617,7 +1617,7 @@ CREATE TABLE [phpbb_users] ( [user_allow_viewonline] [int] DEFAULT (1) NOT NULL , [user_allow_viewemail] [int] DEFAULT (1) NOT NULL , [user_allow_massemail] [int] DEFAULT (1) NOT NULL , - [user_options] [int] DEFAULT (895) NOT NULL , + [user_options] [int] DEFAULT (230271) NOT NULL , [user_avatar] [varchar] (255) DEFAULT ('') NOT NULL , [user_avatar_type] [int] DEFAULT (0) NOT NULL , [user_avatar_width] [int] DEFAULT (0) NOT NULL , diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index a4ae03f5cd..86c3e18e40 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -946,7 +946,7 @@ CREATE TABLE phpbb_users ( user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_options int(11) UNSIGNED DEFAULT '895' NOT NULL, + user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL, user_avatar varbinary(255) DEFAULT '' NOT NULL, user_avatar_type tinyint(2) DEFAULT '0' NOT NULL, user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index ae7f5cd493..81ebb21f7d 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -946,7 +946,7 @@ CREATE TABLE phpbb_users ( user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_options int(11) UNSIGNED DEFAULT '895' NOT NULL, + user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL, user_avatar varchar(255) DEFAULT '' NOT NULL, user_avatar_type tinyint(2) DEFAULT '0' NOT NULL, user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 1b8d0a3bb8..10452ca18c 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1764,7 +1764,7 @@ CREATE TABLE phpbb_users ( user_allow_viewonline number(1) DEFAULT '1' NOT NULL, user_allow_viewemail number(1) DEFAULT '1' NOT NULL, user_allow_massemail number(1) DEFAULT '1' NOT NULL, - user_options number(11) DEFAULT '895' NOT NULL, + user_options number(11) DEFAULT '230271' NOT NULL, user_avatar varchar2(255) DEFAULT '' , user_avatar_type number(2) DEFAULT '0' NOT NULL, user_avatar_width number(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index e92ee29141..3382cf4efc 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -1209,7 +1209,7 @@ CREATE TABLE phpbb_users ( user_allow_viewonline INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewonline >= 0), user_allow_viewemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewemail >= 0), user_allow_massemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_massemail >= 0), - user_options INT4 DEFAULT '895' NOT NULL CHECK (user_options >= 0), + user_options INT4 DEFAULT '230271' NOT NULL CHECK (user_options >= 0), user_avatar varchar(255) DEFAULT '' NOT NULL, user_avatar_type INT2 DEFAULT '0' NOT NULL, user_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_width >= 0), diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 2f57b63a8d..486c0a75a1 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -916,7 +916,7 @@ CREATE TABLE phpbb_users ( user_allow_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1', user_allow_viewemail INTEGER UNSIGNED NOT NULL DEFAULT '1', user_allow_massemail INTEGER UNSIGNED NOT NULL DEFAULT '1', - user_options INTEGER UNSIGNED NOT NULL DEFAULT '895', + user_options INTEGER UNSIGNED NOT NULL DEFAULT '230271', user_avatar varchar(255) NOT NULL DEFAULT '', user_avatar_type tinyint(2) NOT NULL DEFAULT '0', user_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0', |