1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/16741] General fixes

PHPBB3-16741
This commit is contained in:
Tristan Darricau
2021-11-09 02:48:34 +01:00
parent 300e5399f5
commit 6ce708539b
20 changed files with 941 additions and 385 deletions

View File

@@ -72,7 +72,7 @@ class timezone extends \phpbb\db\migration\migration
foreach ($update_blocks as $timezone => $user_ids)
{
$timezone = explode(':', $timezone);
$converted_timezone = $this->convert_phpbb30_timezone($timezone[0], $timezone[1]);
$converted_timezone = static::convert_phpbb30_timezone($timezone[0], $timezone[1]);
$sql = 'UPDATE ' . $this->table_prefix . "users
SET user_timezone = '" . $this->db->sql_escape($converted_timezone) . "'
@@ -88,7 +88,7 @@ class timezone extends \phpbb\db\migration\migration
// Update board default timezone
$sql = 'UPDATE ' . $this->table_prefix . "config
SET config_value = '" . $this->convert_phpbb30_timezone($this->config['board_timezone'], $this->config['board_dst']) . "'
SET config_value = '" . static::convert_phpbb30_timezone($this->config['board_timezone'], $this->config['board_dst']) . "'
WHERE config_name = 'board_timezone'";
$this->sql_query($sql);
}
@@ -101,7 +101,7 @@ class timezone extends \phpbb\db\migration\migration
* @param $dst int Users daylight saving time
* @return string Users new php Timezone which is used since 3.1
*/
public function convert_phpbb30_timezone($timezone, $dst)
public static function convert_phpbb30_timezone($timezone, $dst)
{
$offset = (float) $timezone + (int) $dst;