mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10185] Always set board startdate on conversion
This commit is contained in:
commit
03918f7fd2
1 changed files with 9 additions and 12 deletions
|
@ -1697,20 +1697,17 @@ class install_convert extends module
|
||||||
|
|
||||||
fix_empty_primary_groups();
|
fix_empty_primary_groups();
|
||||||
|
|
||||||
if (!isset($config['board_startdate']))
|
|
||||||
{
|
|
||||||
$sql = 'SELECT MIN(user_regdate) AS board_startdate
|
$sql = 'SELECT MIN(user_regdate) AS board_startdate
|
||||||
FROM ' . USERS_TABLE;
|
FROM ' . USERS_TABLE;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$row = $db->sql_fetchrow($result);
|
$row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
if (($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0) || !isset($config['board_startdate']))
|
if (!isset($config['board_startdate']) || ($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0))
|
||||||
{
|
{
|
||||||
set_config('board_startdate', $row['board_startdate']);
|
set_config('board_startdate', $row['board_startdate']);
|
||||||
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS);
|
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
update_dynamic_config();
|
update_dynamic_config();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue