View Revisions: Issue #25894

Summary 0025894: Remove unused $p_can_report_only parameter in layout_navbar_projects_list()
Revision 2019-06-28 10:43 by dregad
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.

Revision 2019-06-28 10:33 by dregad
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:eb31eb35c1b6f2ddc601f45e0dac535c7bd6c67: but removing the call to check_disabled() left some unused variables.

The useless parameter and unused code need to be removed.

Revision 2019-06-28 10:32 by dregad
Description

Parameter _$p_can_reportonly 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:eb31eb35c1b6f2ddc601f45e0dac535c7bd6c67: but removing the call to check_disabled() left some unused variables.

The useless parameter and unused code need to be removed.