aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/database_update.php
diff options
context:
space:
mode:
authorRuslan Uzdenov <rxu@mail.ru>2009-06-27 08:36:40 +0000
committerRuslan Uzdenov <rxu@mail.ru>2009-06-27 08:36:40 +0000
commitadaeec1ec9f7cd55522a5c4d0bf0538dbc0c6f99 (patch)
tree70452abea87a66678d78e9be28567c3f428193f5 /phpBB/install/database_update.php
parent076067f85649e53c77aceddf68b469ef59a294ca (diff)
downloadforums-adaeec1ec9f7cd55522a5c4d0bf0538dbc0c6f99.tar
forums-adaeec1ec9f7cd55522a5c4d0bf0538dbc0c6f99.tar.gz
forums-adaeec1ec9f7cd55522a5c4d0bf0538dbc0c6f99.tar.bz2
forums-adaeec1ec9f7cd55522a5c4d0bf0538dbc0c6f99.tar.xz
forums-adaeec1ec9f7cd55522a5c4d0bf0538dbc0c6f99.zip
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
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r--phpBB/install/database_update.php21
1 files changed, 21 insertions, 0 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;
}