Page 1 of 1

Bug in attachment module

Posted: 7. May 2024 10:39
by playagiron
Hi,

the portal looks great.
However I get a bug in the attachment modules, whenever I select OR only specific forums or specific extensions to show.

The SQL command to subset these seems to generate wrong SQL code, and I can see it as it somehow adds / around ' signs.

Code: Select all

SELECT a.*, t.forum_id FROM phpbb_attachments a, phpbb_topics t WHERE a.topic_id <> 0 AND a.topic_id = t.topic_id AND t.forum_id IN (\'5\', \'15\', \'32\', \'33\', \'14\', \'31\', \'30\') AND a.extension = \'mp3\' ORDER BY filetime DESC, post_msg_id ASC LIMIT 2
My board runs on PHP 7.4 so dhousl be compatible no?

Re: Bug in attachment module

Posted: 8. May 2024 18:43
by Kirk
Open the File ./ext/board3/portal/modules/attachments.php
Find:

Code: Select all

						' . $this->db->sql_escape($where) . '
Replace with:

Code: Select all

						' . $where . '

Re: Bug in attachment module

Posted: 9. May 2024 09:38
by playagiron
Perfect solution,

thanks a lot Udo!