mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
[ticket/17493] Remove remnants of user_notify_type
PHPBB-17493
This commit is contained in:
@@ -152,7 +152,6 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
|
||||
'user_post_sortby_dir' => 'a',
|
||||
'user_notify' => 0,
|
||||
'user_notify_pm' => 1,
|
||||
'user_notify_type' => 0,
|
||||
'user_allow_pm' => 1,
|
||||
'user_allow_viewonline' => 1,
|
||||
'user_allow_viewemail' => 1,
|
||||
|
@@ -263,7 +263,7 @@ class phpbb_functional_user_password_reset_test extends phpbb_functional_test_ca
|
||||
protected function get_user_data($username)
|
||||
{
|
||||
$db = $this->get_db();
|
||||
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason, reset_token, reset_token_expiration
|
||||
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_actkey, user_inactive_reason, reset_token, reset_token_expiration
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE username = '" . $db->sql_escape($username) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
@@ -30,15 +30,33 @@ class phpbb_notification_convert_test extends phpbb_database_test_case
|
||||
$this->db = $this->new_dbal();
|
||||
$this->doctrine_db = $this->new_doctrine_dbal();
|
||||
$factory = new \phpbb\db\tools\factory();
|
||||
$db_tools = $factory->get($this->doctrine_db);
|
||||
$core_tables = self::get_core_tables();
|
||||
|
||||
// Add user_notify_type column for testing this migration and set type
|
||||
$db_tools->sql_column_add($core_tables['users'], 'user_notify_type', ['TINT:4', 0]);
|
||||
$user_notify_type_map = [
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 1,
|
||||
4 => 1,
|
||||
5 => 2,
|
||||
6 => 2,
|
||||
];
|
||||
|
||||
foreach ($user_notify_type_map as $user_id => $notify_type)
|
||||
{
|
||||
$this->db->sql_query('UPDATE ' . $core_tables['users'] . ' SET user_notify_type = ' . (int) $notify_type . ' WHERE user_id = ' . (int) $user_id);
|
||||
}
|
||||
|
||||
$this->migration = new \phpbb\db\migration\data\v310\notification_options_reconvert(
|
||||
new \phpbb\config\config(array()),
|
||||
$this->db,
|
||||
$factory->get($this->doctrine_db),
|
||||
$db_tools,
|
||||
$phpbb_root_path,
|
||||
$phpEx,
|
||||
'phpbb_',
|
||||
self::get_core_tables()
|
||||
$core_tables
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -4,7 +4,6 @@
|
||||
<column>user_id</column>
|
||||
<column>username</column>
|
||||
<column>username_clean</column>
|
||||
<column>user_notify_type</column>
|
||||
<column>user_notify_pm</column>
|
||||
<column>user_permissions</column>
|
||||
<column>user_sig</column>
|
||||
@@ -13,7 +12,6 @@
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
<value>0</value>
|
||||
<value></value>
|
||||
<value></value>
|
||||
</row>
|
||||
@@ -21,7 +19,6 @@
|
||||
<value>2</value>
|
||||
<value>2</value>
|
||||
<value>2</value>
|
||||
<value>0</value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
<value></value>
|
||||
@@ -30,7 +27,6 @@
|
||||
<value>3</value>
|
||||
<value>3</value>
|
||||
<value>3</value>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
<value></value>
|
||||
<value></value>
|
||||
@@ -40,7 +36,6 @@
|
||||
<value>4</value>
|
||||
<value>4</value>
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
<value></value>
|
||||
</row>
|
||||
@@ -48,7 +43,6 @@
|
||||
<value>5</value>
|
||||
<value>5</value>
|
||||
<value>5</value>
|
||||
<value>2</value>
|
||||
<value>0</value>
|
||||
<value></value>
|
||||
<value></value>
|
||||
@@ -57,7 +51,6 @@
|
||||
<value>6</value>
|
||||
<value>6</value>
|
||||
<value>6</value>
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
<value></value>
|
||||
|
Reference in New Issue
Block a user