diff options
author | Nils Adermann <naderman@naderman.de> | 2010-02-23 23:46:43 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-02-23 23:46:43 +0000 |
commit | 3a48b03547ca5704cc422a6ebe24ecb4b8b17797 (patch) | |
tree | b924f19816627fcb968c9a04d0b538f6104c75f4 /phpBB/includes/functions_admin.php | |
parent | d3459b3f493ddd06b51f345897dc99368a328326 (diff) | |
download | forums-3a48b03547ca5704cc422a6ebe24ecb4b8b17797.tar forums-3a48b03547ca5704cc422a6ebe24ecb4b8b17797.tar.gz forums-3a48b03547ca5704cc422a6ebe24ecb4b8b17797.tar.bz2 forums-3a48b03547ca5704cc422a6ebe24ecb4b8b17797.tar.xz forums-3a48b03547ca5704cc422a6ebe24ecb4b8b17797.zip |
Merging r10491 and r10492: Add sql_bit_or() dbal method. Add ability to enable quick reply in all forums. -- Voila ;-)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_7@10529 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 41999bdbb0..c033684ae1 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -3309,4 +3309,24 @@ function obtain_latest_version_info($force_update = false, $warn_fail = false, $ return $info; } +/** + * Enables a particular flag in a bitfield column of a given table. + * + * @param string $table_name The table to update + * @param string $column_name The column containing a bitfield to update + * @param int $flag The binary flag which is OR-ed with the current column value + * @param string $sql_more This string is attached to the sql query generated to update the table. + * + * @return void + */ +function enable_bitfield_column_flag($table_name, $column_name, $flag, $sql_more = '') +{ + global $db; + + $sql = 'UPDATE ' . $table_name . ' + SET ' . $column_name . ' = ' . $db->sql_bit_or($column_name, $flag) . ' + ' . $sql_more; + $db->sql_query($sql); +} + ?>
\ No newline at end of file |