View Issue Details

IDProjectCategoryView StatusLast Update
0025894mantisbtcode cleanuppublic2019-08-25 12:36
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version2.0.0-beta.1 
Target Version2.22.0Fixed in Version2.22.0 
Summary0025894: Remove unused $p_can_report_only parameter in layout_navbar_projects_list()
Description

Parameter $p_can_report_only on layout_navbar_projects_list() and layout_navbar_subproject_option_list() functions is supposed to disable projects in which user can't report issues.

Historically, it was copied from print_project_option_list() as part of layout API's initial creation (migration to MantisBT 2.0 modern UI), but is never actually used in core (all the calls to these functions rely on the default value "false".

In fact, the functionality was not even operational, because the original code relied on setting the disabled attribute on the <option> element, but the new function uses <a> tags instead, in the context of which the disabled attribute is not available.

That issue was fixed in MantisBT master 1eb31eb3 but removing the call to check_disabled() left some unused variables.

The useless parameter and unused code need to be removed.

TagsNo tags attached.

Activities

Related Changesets

MantisBT: master 1eb31eb3

2016-06-19 09:36

badfiles

Committer: dregad


Details Diff
no 'selected' or 'disabled' attr in <a> context Affected Issues
0025894
mod - core/layout_api.php Diff File

MantisBT: master 5b7403b8

2019-06-28 06:19

dregad


Details Diff
Remove useless code and unused parameter

Parameter $p_can_report_only on layout_navbar_projects_list() and
layout_navbar_subproject_option_list() functions was copied from
print_project_option_list() as part of layout API's initial creation.

It was never used, and in fact, was not even operational.

Commit eb31eb35c1b6f2ddc601f45e0dac535c7bd6c67 removing a call to
check_disabled() which left unused variables and code linked to this
functionality.

This commit finalizes the cleanup operation by removing the useless
parameter and unused code.

Fixes 0025894
Affected Issues
0025894
mod - core/layout_api.php Diff File