mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Using a different approach for the data updates (same as the schema updates)
git-svn-id: file:///svn/phpbb/trunk@6671 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
22c729c41b
commit
688ef7560a
3 changed files with 21 additions and 26 deletions
|
@ -308,7 +308,7 @@ $database_update_info = array(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Latest version
|
// Latest version
|
||||||
'3.0.b4-dev' => array(),
|
'3.0.b4' => array(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Determine mapping database type
|
// Determine mapping database type
|
||||||
|
@ -458,34 +458,29 @@ $errored = $no_updates = false;
|
||||||
|
|
||||||
flush();
|
flush();
|
||||||
|
|
||||||
|
$no_updates = true;
|
||||||
|
|
||||||
// some code magic
|
// some code magic
|
||||||
switch ($current_version)
|
if (version_compare($current_version, '3.0.b3', '<'))
|
||||||
{
|
{
|
||||||
case '3.0.b3':
|
// Set group_founder_manage for administrators group
|
||||||
// Set group_founder_manage for administrators group
|
$sql = 'SELECT group_id
|
||||||
$sql = 'SELECT group_id
|
FROM ' . GROUPS_TABLE . "
|
||||||
FROM ' . GROUPS_TABLE . "
|
WHERE group_name = 'ADMINISTRATORS'
|
||||||
WHERE group_name = 'ADMINISTRATORS'
|
AND group_type = " . GROUP_SPECIAL;
|
||||||
AND group_type = " . GROUP_SPECIAL;
|
$result = $db->sql_query($sql);
|
||||||
$result = $db->sql_query($sql);
|
$group_id = (int) $db->sql_fetchfield('group_id');
|
||||||
$group_id = (int) $db->sql_fetchfield('group_id');
|
$db->sql_freeresult($result);
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
if ($group_id)
|
if ($group_id)
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_founder_manage = 1 WHERE group_id = ' . $group_id;
|
$sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_founder_manage = 1 WHERE group_id = ' . $group_id;
|
||||||
_sql($sql, $errored, $error_ary);
|
_sql($sql, $errored, $error_ary);
|
||||||
}
|
}
|
||||||
|
|
||||||
add_bots();
|
add_bots();
|
||||||
|
|
||||||
// No need to change here. Before this line, no break should appear
|
$no_updates = false;
|
||||||
break;
|
|
||||||
|
|
||||||
case '3.0.b4-dev':
|
|
||||||
default:
|
|
||||||
$no_updates = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_write_result($no_updates, $errored, $error_ary);
|
_write_result($no_updates, $errored, $error_ary);
|
||||||
|
|
Loading…
Add table
Reference in a new issue