jdarwood007

jdarwood007 commited on 2019-02-23 16:02:26
Showing 2 changed files, with 3 additions and 3 deletions.

... ...
@@ -404,7 +404,7 @@ function shd_save_ticket()
404 404
 			'link' => '<a href="' . $scripturl . '?action=helpdesk;sa=ticket;ticket=' . $context['ticket_id'] . '">' . $ticketinfo['subject'] . '</a>',
405 405
 		);
406 406
 	
407
-		$context['can_solve'] = !$new_ticket && (shd_allowed_to('shd_resolve_ticket_any', $dept) || (shd_allowed_to('shd_resolve_ticket_own', $dept) && $ticketinfo['starter_id'] == $user_info['id']));
407
+		$context['can_solve'] = shd_allowed_to('shd_resolve_ticket_any', $dept) || (shd_allowed_to('shd_resolve_ticket_own', $dept) && $ticketinfo['starter_id'] == $user_info['id']);
408 408
 	}
409 409
 
410 410
 	$context['ticket_form'] += array(
... ...
@@ -517,7 +517,7 @@ function shd_save_ticket()
517 517
 			),
518 518
 		);
519 519
 
520
-	if (!$new_ticket)
520
+	if (!empty($context['ticket_id']))
521 521
 	{
522 522
 		loadMemberData($ticketinfo['starter_id']);
523 523
 		if (loadMemberContext($ticketinfo['starter_id']))
... ...
@@ -38,7 +38,7 @@ function shd_download_request(&$attachRequest)
38 38
 	global $smcFunc;
39 39
 
40 40
 	// Is this already a resource?  Then another hook has claimed the attachment as theirs.
41
-	if (!is_null($attachRequest) && is_resource($attachRequest) && empty($_REQUEST['ticket']))
41
+	if (is_resource($attachRequest) && empty($_REQUEST['ticket']))
42 42
 		return;
43 43
 	// If we don't have a ticket present, it is not our attachment.
44 44
 	elseif (empty($_REQUEST['ticket']))
45 45