From b55595fa876fae24b2ccff7253d5e029f049b4cb Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 13 Jul 2021 22:22:43 +0200 Subject: [PATCH] [ticket/14771] Use constants instead of magic numbers in migration PHPBB3-14771 --- .../migration/data/v400/add_audio_files_attachment_group.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/db/migration/data/v400/add_audio_files_attachment_group.php b/phpBB/phpbb/db/migration/data/v400/add_audio_files_attachment_group.php index d6932e6a92..97387720ab 100644 --- a/phpBB/phpbb/db/migration/data/v400/add_audio_files_attachment_group.php +++ b/phpBB/phpbb/db/migration/data/v400/add_audio_files_attachment_group.php @@ -40,7 +40,7 @@ class add_audio_files_attachment_group extends \phpbb\db\migration\migration { $sql = 'INSERT INTO ' . $this->table_prefix . 'extension_groups ' . $this->db->sql_build_array('INSERT', [ 'group_name' => 'AUDIO_FILES', - 'cat_id' => 7, + 'cat_id' => ATTACHMENT_CATEGORY_AUDIO, 'allow_group' => 0, 'upload_icon' => '', 'max_filesize' => 0, @@ -51,7 +51,7 @@ class add_audio_files_attachment_group extends \phpbb\db\migration\migration } else { - $sql = 'UPDATE ' . $this->table_prefix . 'extension_groups SET cat_id = 7 + $sql = 'UPDATE ' . $this->table_prefix . 'extension_groups SET cat_id = ' . ATTACHMENT_CATEGORY_AUDIO . ' WHERE ' . $this->db->sql_build_array('SELECT', ['group_id' => $audio_group_id]); $this->db->sql_query($sql); }