View Issue Details

IDProjectCategoryView StatusLast Update
0025894mantisbtcode cleanuppublic2019-07-01 06:12
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
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 13:36:42

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 10:19:15

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

Issue History

Date Modified Username Field Change
2019-06-28 10:32 dregad New Issue
2019-06-28 10:32 dregad Status new => assigned
2019-06-28 10:32 dregad Assigned To => dregad
2019-06-28 10:33 dregad Summary Removed unused $p_can_report_only parameter in layout_navbar_projects_list() => Remove unused $p_can_report_only parameter in layout_navbar_projects_list()
2019-06-28 10:33 dregad Description Updated View Revisions
2019-06-28 10:38 dregad Note Added: 0062343
2019-06-28 10:40 dregad Changeset attached => MantisBT master 1eb31eb3
2019-06-28 10:43 dregad Description Updated View Revisions
2019-07-01 05:58 dregad Changeset attached => MantisBT master 5b7403b8
2019-07-01 05:58 dregad Status assigned => resolved
2019-07-01 05:58 dregad Resolution open => fixed
2019-07-01 05:58 dregad Fixed in Version => 2.21.2
2019-07-01 06:12 dregad Fixed in Version 2.21.2 => 2.22.0