From 4890006cbb13635c97b03ab2c7d06ed613b8b16b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 27 Jan 2011 17:24:03 +0100 Subject: [ticket/9944] Extension groups naming don't use users' language in ACP Only happens on boards which were installed with 3.0.8 PHPBB3-9944 --- phpBB/install/database_update.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'phpBB/install/database_update.php') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 25b50c724e..fb1024be99 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -916,6 +916,8 @@ function database_update_info() '3.0.7-PL1' => array(), // No changes from 3.0.8-RC1 to 3.0.8 '3.0.8-RC1' => array(), + // No changes from 3.0.8 to 3.0.9-RC1 + '3.0.8' => array(), ); } @@ -1858,6 +1860,29 @@ function change_database_data(&$no_updates, $version) // No changes from 3.0.8-RC1 to 3.0.8 case '3.0.8-RC1': break; + + // Changes from 3.0.8 to 3.0.9-RC1 + case '3.0.8': + // Update file extension group names to use language strings, again. + $sql = 'SELECT group_id, group_name + FROM ' . EXTENSION_GROUPS_TABLE . ' + WHERE group_name ' . $db->sql_like_expression('EXT_GROUP_' . $db->any_char); + $result = $db->sql_query($sql); + while ($row = $db->sql_fetchrow($result)) + { + $sql_ary = array( + 'group_name' => substr($row['group_name'], 10), // Strip off 'EXT_GROUP_' + ); + + $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . ' + SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' + WHERE group_id = ' . $row['group_id']; + _sql($sql, $errored, $error_ary); + } + $db->sql_freeresult($result); + + $no_updates = false; + break; } } -- cgit v1.2.1 From bcbbeacaf87e217a72f704229e9e43cc36b9f8e3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 14 Feb 2011 16:40:12 +0100 Subject: [ticket/9944] Add empty line before the while() so you can better read the code PHPBB3-9944 --- phpBB/install/database_update.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/install/database_update.php') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index fb1024be99..4d3d51923b 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -1868,6 +1868,7 @@ function change_database_data(&$no_updates, $version) FROM ' . EXTENSION_GROUPS_TABLE . ' WHERE group_name ' . $db->sql_like_expression('EXT_GROUP_' . $db->any_char); $result = $db->sql_query($sql); + while ($row = $db->sql_fetchrow($result)) { $sql_ary = array( -- cgit v1.2.1