From d529f78adb85698c9382ad29e4583f309eaf850a Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 24 Nov 2006 14:59:26 +0000 Subject: rather large update, most important things done: - implemented provided patch/diff file for bug #5350 (Highway of Life) with some tiny changes and alterations - more username/colour changes/fixes - added a note about PM rule-dependant message removals so the user is not wondering too much if he can't remember his rules. :) - some column changes to fix unicode issues - bugfixes git-svn-id: file:///svn/phpbb/trunk@6650 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/database_update.php | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'phpBB/install/database_update.php') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 6c03697e52..25ed12b824 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -289,13 +289,19 @@ $database_update_info = array( BBCODES_TABLE => array( 'bbcode_helpline' => array('VCHAR_UNI', ''), ), + USERS_TABLE => array( + 'user_occ' => array('TEXT_UNI', ''), + ), + CONFIG_TABLE => array( + 'config_value' => array('VCHAR_UNI', ''), + ), ), - /* Add the following columns + // Add the following columns 'add_columns' => array( - {table} => array( - {column_name} => array('USINT', 0), -> column type + GROUPS_TABLE => array( + 'group_founder_manage' => array('BOOL', 0), ), - ),*/ + ), ), // Latest version '3.0.b4-dev' => array(), @@ -448,13 +454,26 @@ $errored = $no_updates = false; flush(); +// some code magic switch ($current_version) { case '3.0.b3': -/* - some code magic -*/ - // No need to change here, before no break should appear + // Set group_founder_manage for administrators group + $sql = 'SELECT group_id + FROM ' . GROUPS_TABLE . " + WHERE group_name = 'ADMINISTRATORS' + AND group_type = " . GROUP_SPECIAL; + $result = $db->sql_query($sql); + $group_id = (int) $db->sql_fetchfield('group_id'); + $db->sql_freeresult($result); + + if ($group_id) + { + $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_founder_manage = 1 WHERE group_id = ' . $group_id; + _sql($sql, $errored, $error_ary); + } + + // No need to change here. Before this line, no break should appear break; case '3.0.b4-dev': @@ -628,7 +647,7 @@ function column_exists($dbms, $table, $column_name) } /** -* Function to prepare some column informations for better usage +* Function to prepare some column information for better usage */ function prepare_column_data($dbms, $column_data) { -- cgit v1.2.1