View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0020535 | mantisbt | plug-ins | public | 2016-01-21 13:51 | 2016-08-28 01:12 |
Reporter | gthomas | Assigned To | cproensa | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.0-rc.1 | ||||
Target Version | 1.3.1 | Fixed in Version | 1.3.1 | ||
Summary | 0020535: EVENT_BUG_VIEW_ATTACHMENT prints an extra "Array" before the plugin output. | ||||
Description | I've created a simple plugin to display the attachment's owner (attacher) - see https://github.com/tgulacsi/mantisbt-plugins-ShowAttacher It prints the wanted user name, but prefixes it with "Array". As I see it's 'cause event_type_output sets $t_prefix=$p_params[0], which is the attachment's row - an Array. What should be sent to event_type_output in print_api.php? | ||||
Tags | No tags attached. | ||||
This event was added by 0777a1c5f2a2ae661ae546f3d6324079fdbfc515 I see two ways of fixing this: I think (2) may be good in the long run, but needs to be reviewed. For a quick fix, change in "events_inc.php" |
|
Thanks, this works! |
|
MantisBT: master da98b637 2016-01-22 03:37 Committer: vboctor Details Diff |
Fix passing parameters for EVENT_TYPE_OUTPUT events Some events of EVENT_TYPE_OUTPUT specify a parameter to be passed to the callback function. However the event dispatcher for that type was not designed to receive a parameter in that way. Modified the event function to allow for that parameter to be passed on, thus matching documented specification and current use in code base. Affected events are: EVENT_MANAGE_OVERVIEW_INFO EVENT_VIEW_BUG_ATTACHMENT Those events have not been working properly until now. Fixes 0020535 |
Affected Issues 0020535 |
|
mod - core/event_api.php | Diff File | ||
MantisBT: master-1.3.x a409d928 2016-01-22 03:37 Committer: vboctor Details Diff |
Fix passing parameters for EVENT_TYPE_OUTPUT events Some events of EVENT_TYPE_OUTPUT specify a parameter to be passed to the callback function. However the event dispatcher for that type was not designed to receive a parameter in that way. Modified the event function to allow for that parameter to be passed on, thus matching documented specification and current use in code base. Affected events are: EVENT_MANAGE_OVERVIEW_INFO EVENT_VIEW_BUG_ATTACHMENT Those events have not been working properly until now. Fixes 0020535 |
Affected Issues 0020535 |
|
mod - core/event_api.php | Diff File |