mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-22 18:08:54 +00:00
[ticket/14771] Use constants instead of magic numbers in migration
PHPBB3-14771
This commit is contained in:
parent
3c63116fe7
commit
b55595fa87
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue