MantisBT: master-1.2.x a8e5b81a

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2012-04-25 00:56 master-1.2.x 1eaaeff3
Affected Issues  0014191: SYSTEM NOTICE: 'Undefined variable: t_project' in html_api.php
Changeset

Use BugData object as function param for several functions

Commit 0ec4563af05e02dfe9d82238f3f1634fd3884b0e introduced an undefined
variable warning, due to removal of a call to bug_get_field function to
retrieve the project_id. This could actually cause the incorrect status
to be retrieved in html_button_bug_reopen() and html_button_bug_close(),
potentially allowing users to close or reopen issues when they are not
entitled to.

Instead of adding the function call back as it was, the code was
modified to use a BugData object instead of a bug id as parameter for
several functions in access_api.php and html_api.php, resulting in
simpler and more efficient code thanks to fewer calls to bug_get() and
bug_get_field().

Fixes 0014191, Affects 0014156

mod - bug_actiongroup.php Diff File
mod - bug_change_status_page.php Diff File
mod - bug_update_advanced_page.php Diff File
mod - core/access_api.php Diff File
mod - core/html_api.php Diff File