jdarwood007 commited on 2019-02-23 13:40:23
Showing 2 changed files, with 7 additions and 5 deletions.
... | ... |
@@ -804,7 +804,7 @@ function shd_post_reply() |
804 | 804 |
// So it's either our ticket and we can reply to our own, or we can reply to any because we're awesome |
805 | 805 |
// or we're editing and we can haz such powarz |
806 | 806 |
$context['ticket_form'] = array( // yes, everything goes in here. |
807 |
- 'is_new' => $new_rely, |
|
807 |
+ 'is_new' => $new_reply, |
|
808 | 808 |
'is_reply' => true, |
809 | 809 |
'dept' => $ticketinfo['dept'], |
810 | 810 |
'form_title' => !empty($reply['id_msg']) ? $txt['shd_ticket_edit_reply'] : $txt['shd_reply_ticket'], |
... | ... |
@@ -860,7 +860,7 @@ function shd_post_reply() |
860 | 860 |
$context['display_private'] = true; |
861 | 861 |
|
862 | 862 |
// Can they alter the hold? |
863 |
- $context['can_alter_hold'] = !$context['ticket_form']['is_new'] && empty($ticketinfo['is_own']) && shd_allowed_to('shd_alter_hold', $dept); |
|
863 |
+ $context['can_alter_hold'] = !$context['ticket_form']['is_new'] && empty($ticketinfo['is_own']) && shd_allowed_to('shd_alter_hold', $context['ticket_form']['dept']); |
|
864 | 864 |
|
865 | 865 |
loadMemberData($ticketinfo['starter_id']); |
866 | 866 |
if (loadMemberContext($ticketinfo['starter_id'])) |
... | ... |
@@ -1096,7 +1096,7 @@ function shd_save_reply() |
1096 | 1096 |
$context['display_private'] = true; |
1097 | 1097 |
|
1098 | 1098 |
// Can they alter the hold? |
1099 |
- $context['can_alter_hold'] = !$context['ticket_form']['is_new'] && empty($ticketinfo['is_own']) && shd_allowed_to('shd_alter_hold', $dept); |
|
1099 |
+ $context['can_alter_hold'] = !$context['ticket_form']['is_new'] && empty($ticketinfo['is_own']) && shd_allowed_to('shd_alter_hold', $context['ticket_form']['dept']); |
|
1100 | 1100 |
|
1101 | 1101 |
loadMemberData($ticketinfo['starter_id']); |
1102 | 1102 |
if (loadMemberContext($ticketinfo['starter_id'])) |
... | ... |
@@ -1038,12 +1038,14 @@ function shd_ticket_on_hold($on_hold = false, &$ticketOptions) |
1038 | 1038 |
$new_status = TICKET_STATUS_PENDING_USER; |
1039 | 1039 |
elseif (!empty($row['id_member']) && $context['ticket_form']['member']['id'] == $row['id_member']) |
1040 | 1040 |
$new_status = TICKET_STATUS_PENDING_STAFF; |
1041 |
- else |
|
1042 |
- return false; |
|
1043 | 1041 |
|
1044 | 1042 |
// Hook may want to do something different here. |
1045 | 1043 |
call_integration_hook('shd_ticket_on_hold', array($current_status, &$new_status)); |
1046 | 1044 |
|
1045 |
+ // Do nothing. |
|
1046 |
+ if ($current_status == $new_status) |
|
1047 |
+ return false; |
|
1048 |
+ |
|
1047 | 1049 |
$ticketOptions['status'] = $new_status; |
1048 | 1050 |
return true; |
1049 | 1051 |
} |
1050 | 1052 |
\ No newline at end of file |
1051 | 1053 |