Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8ae62f3621d8
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3eb0430b3352
Choose a head ref
  • 3 commits
  • 3 files changed
  • 3 contributors

Commits on Sep 21, 2012

  1. added print attachment event

    Added documentation and included event in events_inc
    Raymond van Asperen authored and dregad committed Sep 21, 2012
    Copy the full SHA
    0777a1c View commit details
  2. Copy the full SHA
    bc3701b View commit details
  3. Fix #13236: Added event 'EVENT_VIEW_BUG_ATTACHMENT'

    Allows printing HTML code after each attachment.
    
    Moved the event definition with other bug-related events.
    dregad committed Sep 21, 2012
    Copy the full SHA
    3eb0430 View commit details
Showing with 15 additions and 0 deletions.
  1. +1 −0 core/events_inc.php
  2. +1 −0 core/print_api.php
  3. +13 −0 docbook/Developers_Guide/en-US/Events_Reference_Output.xml
1 change: 1 addition & 0 deletions core/events_inc.php
Original file line number Diff line number Diff line change
@@ -82,6 +82,7 @@
# Bug view events
'EVENT_VIEW_BUG_DETAILS' => EVENT_TYPE_EXECUTE,
'EVENT_VIEW_BUG_EXTRA' => EVENT_TYPE_EXECUTE,
'EVENT_VIEW_BUG_ATTACHMENT' => EVENT_TYPE_OUTPUT,
'EVENT_VIEW_BUGNOTES_START' => EVENT_TYPE_EXECUTE,
'EVENT_VIEW_BUGNOTE' => EVENT_TYPE_EXECUTE,
'EVENT_VIEW_BUGNOTES_END' => EVENT_TYPE_EXECUTE,
1 change: 1 addition & 0 deletions core/print_api.php
Original file line number Diff line number Diff line change
@@ -1541,6 +1541,7 @@ function print_bug_attachment_header( $p_attachment ) {
}
echo lang_get( 'word_separator' ) . '(' . number_format( $p_attachment['size'] ) . lang_get( 'word_separator' ) . lang_get( 'bytes' ) . ')';
echo lang_get( 'word_separator' ) . '<span class="italic">' . date( config_get( 'normal_date_format' ), $p_attachment['date_added'] ) . '</span>';
event_signal('EVENT_VIEW_BUG_ATTACHMENT', array($p_attachment));
} else {
print_file_icon( $p_attachment['display_name'] );
echo lang_get( 'word_separator' ) . '<span class="strike">' . string_display_line( $p_attachment['display_name'] ) . '</span>' . lang_get( 'word_separator' ) . '(' . lang_get( 'attachment_missing' ) . ')';
13 changes: 13 additions & 0 deletions docbook/Developers_Guide/en-US/Events_Reference_Output.xml
Original file line number Diff line number Diff line change
@@ -407,5 +407,18 @@
</blockquote>
</blockquote>

<blockquote id="dev.eventref.output.layout.bodyend">
<title>EVENT_VIEW_BUG_ATTACHMENT (Output)</title>
<blockquote>
<para>
This event allows plugins to output HTML code immediately after the line of an attachment.
</para>

<itemizedlist>
<title>Return Value</title>
<listitem><para>String: HTML code to output.</para></listitem>
</itemizedlist>
</blockquote>
</blockquote>
</sect2>
</sect1>