mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/11031] Correctly add groups to teampage
PHPBB3-11031
This commit is contained in:
@@ -828,7 +828,10 @@ if (!$get_info)
|
||||
array(
|
||||
'target' => GROUPS_TABLE,
|
||||
'autoincrement' => 'group_id',
|
||||
'query_first' => array('target', $convert->truncate_statement . GROUPS_TABLE),
|
||||
'query_first' => array(
|
||||
array('target', $convert->truncate_statement . GROUPS_TABLE),
|
||||
array('target', $convert->truncate_statement . TEAMPAGE_TABLE),
|
||||
),
|
||||
|
||||
array('group_id', 'groups.group_id', ''),
|
||||
array('group_type', 'groups.group_type', 'phpbb_convert_group_type'),
|
||||
@@ -845,6 +848,7 @@ if (!$get_info)
|
||||
'query_first' => array('target', $convert->truncate_statement . USER_GROUP_TABLE),
|
||||
'execute_first' => '
|
||||
add_default_groups();
|
||||
add_groups_to_teampage();
|
||||
',
|
||||
|
||||
array('group_id', 'groups.group_id', ''),
|
||||
|
@@ -1933,3 +1933,43 @@ function phpbb_convert_timezone($timezone)
|
||||
$timezone_migration = new \phpbb\db\migration\data\v310\timezone($config, $db, new \phpbb\db\tools($db), $phpbb_root_path, $phpEx, $table_prefix);
|
||||
return $timezone_migration->convert_phpbb30_timezone($timezone, 0);
|
||||
}
|
||||
|
||||
function phpbb_add_notification_options($user_notify_pm)
|
||||
{
|
||||
global $convert_row, $db;
|
||||
|
||||
$user_id = phpbb_user_id($convert_row['user_id']);
|
||||
if ($user_id == ANONYMOUS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$rows = array();
|
||||
|
||||
$rows[] = array(
|
||||
'item_type' => 'post',
|
||||
'item_id' => 0,
|
||||
'user_id' => (int) $user_id,
|
||||
'notify' => 1,
|
||||
'method' => 'email',
|
||||
);
|
||||
$rows[] = array(
|
||||
'item_type' => 'topic',
|
||||
'item_id' => 0,
|
||||
'user_id' => (int) $user_id,
|
||||
'notify' => 1,
|
||||
'method' => 'email',
|
||||
);
|
||||
if ($user_notify_pm)
|
||||
{
|
||||
$rows[] = array(
|
||||
'item_type' => 'pm',
|
||||
'item_id' => 0,
|
||||
'user_id' => (int) $user_id,
|
||||
'notify' => 1,
|
||||
'method' => 'email',
|
||||
);
|
||||
}
|
||||
|
||||
$sql = $db->sql_multi_insert(USER_NOTIFICATIONS_TABLE, $rows);
|
||||
}
|
||||
|
Reference in New Issue
Block a user