diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2011-11-18 18:07:58 +0100 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2011-11-18 18:07:58 +0100 |
| commit | 03918f7fd2fd790d5ebd4330f9f913bfcc206f91 (patch) | |
| tree | 5db19acf3126408eeec91897980bd403cbfffea7 | |
| parent | c2a19235ebcbaa7007a6b801f739b24c206056a1 (diff) | |
| parent | 93c4cdd1dee4a408ef071b6ba67cbd2817f40c83 (diff) | |
| download | forums-03918f7fd2fd790d5ebd4330f9f913bfcc206f91.tar forums-03918f7fd2fd790d5ebd4330f9f913bfcc206f91.tar.gz forums-03918f7fd2fd790d5ebd4330f9f913bfcc206f91.tar.bz2 forums-03918f7fd2fd790d5ebd4330f9f913bfcc206f91.tar.xz forums-03918f7fd2fd790d5ebd4330f9f913bfcc206f91.zip | |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10185] Always set board startdate on conversion
| -rw-r--r-- | phpBB/install/install_convert.php | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 7837353cfa..c3b3dfcf66 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -1697,19 +1697,16 @@ class install_convert extends module fix_empty_primary_groups(); - if (!isset($config['board_startdate'])) - { - $sql = 'SELECT MIN(user_regdate) AS board_startdate - FROM ' . USERS_TABLE; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); + $sql = 'SELECT MIN(user_regdate) AS board_startdate + FROM ' . USERS_TABLE; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); - if (($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0) || !isset($config['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); - } + if (!isset($config['board_startdate']) || ($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0)) + { + set_config('board_startdate', $row['board_startdate']); + $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS); } update_dynamic_config(); |
