MantisBT: master 70c90e79

Author Committer Branch Timestamp Parent
dregad dregad master 2026-06-03 12:01 master f9898b60
Affected Issues  0037315: Avoid SQL query duplication in bugnote API
Changeset

Avoid duplicating SQL statement

Nearly identical SQL query is used both in bugnote_get_all_bugnotes()
and in bugnote_exists().

Define a constant to extract the common part, and use DbQuery to build
the differing WHERE clause and ORDER BY.

Add type declarations to bugnote_get_all_bugnotes(), so we don't need to
cast $p_bug_id to int all the time.

Fixes 0037315

mod - core/bugnote_api.php Diff File