View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0037315 | mantisbt | code cleanup | public | 2026年07月18日 12:42 | 2026年07月18日 12:44 |
| Reporter | dregad | Assigned To | dregad | ||
| Priority | normal | Severity | tweak | Reproducibility | N/A |
| Status | resolved | Resolution | fixed | ||
| Target Version | 2.29.0 | Fixed in Version | 2.29.0 | ||
| Summary | 0037315: Avoid SQL query duplication in bugnote API | ||||
| Description | Nearly identical SQL query is used both in bugnote_get_all_bugnotes() and in bugnote_exists(). It should be factored out. | ||||
| Tags | No tags attached. | ||||
MantisBT: master 70c90e79
2026年06月03日 12:01
Details Diff 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 Affected Issues
0037315
Powered by MantisBT 2.29.0-dev-master-e4ff7ef87
Copyright © 2000 - 2026 MantisBT Team
Contact administrator for assistance
Copyright © 2000 - 2026 MantisBT Team
Contact administrator for assistance
Page execution time: 0.2924 seconds