[ticket/11881] Make sure user_timezone isn't converted twice

PHPBB3-11881
This commit is contained in:
Nathan Guse 2013-10-04 15:04:08 -05:00
parent 9653276ebc
commit cd7d29b90e

View file

@ -55,8 +55,13 @@ class timezone extends \phpbb\db\migration\migration
{ {
$converted++; $converted++;
// In case this is somehow run twice on a row.
// Otherwise it would just end up as UTC on the second run
if (is_numeric($row['user_timezone']))
{
$update_blocks[$row['user_timezone'] . ':' . $row['user_dst']][] = (int) $row['user_id']; $update_blocks[$row['user_timezone'] . ':' . $row['user_dst']][] = (int) $row['user_id'];
} }
}
$this->db->sql_freeresult($result); $this->db->sql_freeresult($result);
// Update blocks of users who share the same timezone/dst // Update blocks of users who share the same timezone/dst