1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

Fixed Bug #45115 - Signature parsing flags are not stored in DB

Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9696 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Ruslan Uzdenov
2009-06-27 08:36:40 +00:00
parent 076067f856
commit adaeec1ec9
13 changed files with 56 additions and 16 deletions

View File

@@ -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;
}

View File

@@ -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,

View File

@@ -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 ,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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),

View File

@@ -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',