From ed3eacff448bc52970707ebe7fd6c63d5ab1bca3 Mon Sep 17 00:00:00 2001 From: "privet.fun" Date: Sat, 7 Oct 2023 13:34:57 -0700 Subject: [PATCH] Commented out core.modify_attachment_sql_ary_on_submit --- privet/ailabs/includes/AIController.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/privet/ailabs/includes/AIController.php b/privet/ailabs/includes/AIController.php index 0a3ab68..e421646 100644 --- a/privet/ailabs/includes/AIController.php +++ b/privet/ailabs/includes/AIController.php @@ -422,13 +422,15 @@ class AIController 'topic_id' => $topicId, ); - if ($dispatchEvent) { - $dispatcher = $this->phpbb_container->get('dispatcher'); - // Same exact code as in https://github.com/phpbb/phpbb/blob/master/phpBB/includes/message_parser.php - // See core.modify_attachment_sql_ary_on_submit https://area51.phpbb.com/docs/dev/3.3.x/extensions/events_list.html - $vars_array = array('sql_ary'); - extract($dispatcher->trigger_event('core.modify_attachment_sql_ary_on_submit', compact($vars_array))); - } + // Same exact code as in https://github.com/phpbb/phpbb/blob/master/phpBB/includes/message_parser.php + // See core.modify_attachment_sql_ary_on_submit https://area51.phpbb.com/docs/dev/3.3.x/extensions/events_list.html + // Used solution proposed in https://www.phpbb.com/community/viewtopic.php?t=2556226 + // Commented out after reading https://www.phpbb.com/community/viewtopic.php?t=2287631 + // if ($dispatchEvent) { + // $dispatcher = $this->phpbb_container->get('dispatcher'); + // $vars = array('sql_ary'); + // extract($dispatcher->trigger_event('core.modify_attachment_sql_ary_on_submit', compact($vars))); + // } $this->db->sql_query('INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $this->db->sql_build_array('INSERT', $sql_ary)); $newAttachmentID = intval($this->db->sql_nextid());