View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 0034492 | mantisbt | code cleanup | public | 2024-06-30 08:51 | 2024-08-25 04:31 | 
| Reporter | dregad | Assigned To | dregad | ||
| Priority | normal | Severity | tweak | Reproducibility | N/A | 
| Status | closed | Resolution | fixed | ||
| Target Version | 2.26.3 | Fixed in Version | 2.26.3 | ||
| Summary | 0034492: Duplicated code in admin/check_api.php | ||||
| Description | Functions check_print_test_row() and check_print_test_warn_row() are almost identical, the only difference being in the logic to determine if the check is a warning or failure. We should simplify the code to use a single function. | ||||
| Tags | No tags attached. | ||||
| MantisBT: master-2.26 7a49e0b8 2024-06-30 07:36 Details Diff | Remove code duplication in check_api.php Functions check_print_test_row() and check_print_test_warn_row() were almost identical, the only difference being in the logic to determine if the check is a warning or failure. A new optional parameter $p_warning was added to check_print_test_row() and the logic adapted, allowing removal of duplicat code in check_print_test_warn_row() which is reduce to a simple call to check_print_test_row(). Fixes 0034492 | Affected Issues 0034492 | |
| mod - admin/check/check_api.php | Diff File | ||
