Skip to content

Commit

Permalink
Gave possibility to change object during pre_show
Browse files Browse the repository at this point in the history
to fix #1122 in 9.1/bugfixes (#1128)
  • Loading branch information
tomolimo authored Oct 6, 2016
1 parent cf2190d commit d218977
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inc/ticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6334,7 +6334,11 @@ function showTimeline($rand) {
}
Plugin::doHook('pre_show_item', array('item' => &$obj, 'options' => &$options));

$item_i = $item['item'];
if( is_array( $obj ) ){
$item_i = $obj['item'];
} else {
$item_i = $obj->fields;
}

$date = "";
if (isset($item_i['date'])) {
Expand Down

7 comments on commit d218977

@remicollet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This need to also be applied in master

@tomolimo
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in PR #1129

@remicollet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the same commit apply, just git cherry-pick it from 9.1 to master

@tomolimo
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I searched for this feature, but was not able to find it 😭

@tomolimo
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really: I'm very bad with github!

@remicollet
Copy link
Contributor

@remicollet remicollet commented on d218977 Oct 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a github feature ;)

This is just a standard git feature

$ git checkout 9.1/bugfixes
$ git log (and copy commit ref)
$ git checkout master
$ git cherry-pick <paste_the_ref>
$ git push

P.S could be nice to see you on Freenode #GLPI IRC channel

@tomolimo
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I'll look into my TortoiseGit next time :)
For freenode: do you have any URL to direct me?

Please sign in to comment.