Skip to content

Commit

Permalink
Remove unnecessary return value from EVENT_UPDATE_BUG_DATA
Browse files Browse the repository at this point in the history
The EVENT_UPDATE_BUG_DATA event call within bug_update.php was forcing
the return of the original bug structure. This is unnecessary
information as bug_update.php already has this information at hand.
  • Loading branch information
davidhicks committed Apr 7, 2011
1 parent 79ffdb8 commit 73493e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions bug_update.php
Expand Up @@ -341,9 +341,7 @@
helper_call_custom_function( 'issue_update_validate', array( $f_bug_id, $t_updated_bug, $t_bug_note->note ) );

# Allow plugins to validate/modify the update prior to it being committed.
$t_event_updated_bug = event_signal( 'EVENT_UPDATE_BUG_DATA', array( $t_existing_bug, $t_updated_bug ) );
$t_existing_bug = $t_event_updated_bug[0];
$t_updated_bug = $t_event_updated_bug[1];
$t_updated_bug = event_signal( 'EVENT_UPDATE_BUG_DATA', $t_updated_bug, $t_existing_bug );

# Commit the bug updates to the database.
$t_text_field_update_required = ( $t_existing_bug->description !== $t_updated_bug->description ) ||
Expand Down
3 changes: 1 addition & 2 deletions docbook/Developers_Guide/en-US/Events_Reference_Bug.xml
Expand Up @@ -213,13 +213,12 @@

<itemizedlist>
<title>Parameters</title>
<listitem><para>&lt;Complex&gt;: Original bug data structure (see <filename>core/bug_api.php</filename>)</para></listitem>
<listitem><para>&lt;Complex&gt;: Updated bug data structure (see <filename>core/bug_api.php</filename>)</para></listitem>
<listitem><para>&lt;Complex&gt;: Original bug data structure (see <filename>core/bug_api.php</filename>)</para></listitem>
</itemizedlist>

<itemizedlist>
<title>Return Value</title>
<listitem><para>&lt;Complex&gt;: Original bug data structure (see <filename>core/bug_api.php</filename>)</para></listitem>
<listitem><para>&lt;Complex&gt;: Updated bug data structure (see <filename>core/bug_api.php</filename>)</para></listitem>
</itemizedlist>
</blockquote>
Expand Down

0 comments on commit 73493e2

Please sign in to comment.