View Issue Details

IDProjectCategoryView StatusLast Update
0034492mantisbtcode cleanuppublic2024-08-25 04:31
Reporterdregad Assigned Todregad  
PrioritynormalSeveritytweakReproducibilityN/A
Status closedResolutionfixed 
Target Version2.26.3Fixed in Version2.26.3 
Summary0034492: 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.

TagsNo tags attached.

Activities

Related Changesets

MantisBT: master-2.26 7a49e0b8

2024-06-30 07:36

dregad


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