Skip to content

Commit

Permalink
Revert "[0.90] fix associated element on update ticket - see #596; fix
Browse files Browse the repository at this point in the history
…#835

This reverts commit 708f069.
  • Loading branch information
orthagh committed Jul 27, 2016
1 parent 445ae11 commit b4b8d79
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions inc/ticket.class.php
Expand Up @@ -4206,23 +4206,22 @@ class='pointer' src='".$CFG_GLPI["root_doc"]."/pics/showselect.png'></a>";
}
echo $tt->getEndHiddenFieldValue('itemtype', $this);
} else {
if ($canupdate
|| $canupdate_descr) {
// display associated elements
$item_tickets = getAllDatasFromTable(getTableForItemType('Item_Ticket'),
"`tickets_id`='".$ID."'");
$i = 0;
foreach ($item_tickets as $itdata) {
if ($i >= 5) {
echo "<i><a href='".$this->getFormURL()."?id=".$ID."&amp;forcetab=Item_Ticket$1'>".
__('Display all items')." (".count($item_tickets).")</a></i>";
break;
}
$item = new $itdata['itemtype'];
$item->getFromDB($itdata['items_id']);
echo $item->getTypeName(1).": ".$item->getLink(array('comments' => true))."<br/>";
$i++;
$item_tickets = getAllDatasFromTable(
getTableForItemType('Item_Ticket'),
"`tickets_id`='".$ID."'");
$i = 0;
foreach ($item_tickets as $itdata) {
if ($i >= 5) {
echo "<i><a href='".$this->getFormURL()."?id=".$ID.
"&amp;forcetab=Item_Ticket$1'>"
.__('Display all items')." (".count($item_tickets).")</a></i>";
break;
}
$item = new $itdata['itemtype'];
$item->getFromDB($itdata['items_id']);
echo $item->getTypeName(1).": ".$item->getLink(array('comments' => true))."<br/>";
$i++;
}

}
Expand Down

1 comment on commit b4b8d79

@yllen
Copy link
Collaborator

@yllen yllen commented on b4b8d79 Aug 12, 2016

Choose a reason for hiding this comment

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

So now, without update right i can add new elements in a ticket.
I'm no agree with this post

Please sign in to comment.