Skip to content

Commit

Permalink
[0.90] requester name in timeline ticket - see #348
Browse files Browse the repository at this point in the history
  • Loading branch information
yllen committed Feb 12, 2016
1 parent f3bbb00 commit 60d3799
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions inc/ticket.class.php
Expand Up @@ -6439,9 +6439,26 @@ function showTimeline($rand) {
echo "<div class='h_info'>";
echo "<div class='h_date'>".Html::convDateTime($this->fields['date'])."</div>";
echo "<div class='h_user'>";
if (isset($item_i['users_id_recipient'])
&& ($item_i['users_id_recipient'] != 0)) {
$user->getFromDB($this->fields['users_id_recipient']);
$dem = '0';
foreach ($DB->request("glpi_tickets_users",
"`tickets_id` = ".$this->fields['id']." AND `type` = 1") AS $req) {
$dem = $req['users_id'];
}
if ((!isset($item_i['users_id_recipient'])
|| ($item_i['users_id_recipient'] == 0))
&& ($dem == 0)) {
_e("Requester");
}
else {
if (isset($item_i['users_id_recipient'])
&& ($item_i['users_id_recipient'] != 0)) {
$user->getFromDB($this->fields['users_id_recipient']);
} else if ($dem > 0) {
$requester = new User();
if ($requester->getFromDB($dem)) {
$user = $requester;
}
}

echo "<div class='tooltip_picture_border'>";
$picture = "";
Expand All @@ -6453,8 +6470,6 @@ function showTimeline($rand) {
echo "</div>";

echo $user->getLink();
} else {
_e("Requester");
}

echo "</div>"; // h_user
Expand Down

0 comments on commit 60d3799

Please sign in to comment.