jdarwood007 commited on 2019-03-09 12:38:23
Showing 1 changed files, with 11 additions and 11 deletions.
... | ... |
@@ -175,7 +175,7 @@ function shd_post_ticket() |
175 | 175 |
// Can they alter the hold? |
176 | 176 |
$context['can_alter_hold'] = !$context['ticket_form']['is_new'] && empty($ticketinfo['is_own']) && shd_allowed_to('shd_alter_hold', $dept); |
177 | 177 |
|
178 |
- if (!$new_ticket && !empty($ticketinfo)) |
|
178 |
+ if (!$context['ticket_form']['is_new'] && !empty($ticketinfo)) |
|
179 | 179 |
{ |
180 | 180 |
$context['ticket_form'] += array( |
181 | 181 |
'member' => array( |
... | ... |
@@ -194,7 +194,7 @@ function shd_post_ticket() |
194 | 194 |
if (loadMemberContext($ticketinfo['starter_id'])) |
195 | 195 |
$context['ticket_form']['member']['avatar'] = $memberContext[$ticketinfo['starter_id']]['avatar']; |
196 | 196 |
|
197 |
- if (!$new_ticket && !empty($ticketinfo['modified_time'])) |
|
197 |
+ if (!$context['ticket_form']['is_new'] && !empty($ticketinfo['modified_time'])) |
|
198 | 198 |
$context['ticket_form'] += array( |
199 | 199 |
'modified' => array( |
200 | 200 |
'name' => $ticketinfo['modified_name'], |
... | ... |
@@ -225,7 +225,7 @@ function shd_post_ticket() |
225 | 225 |
), |
226 | 226 |
); |
227 | 227 |
|
228 |
- shd_get_urgency_options($new_ticket || (!empty($ticketinfo) && $ticketinfo['is_own']), $context['ticket_form']['dept']); |
|
228 |
+ shd_get_urgency_options($context['ticket_form']['is_new'] || (!empty($ticketinfo) && $ticketinfo['is_own']), $context['ticket_form']['dept']); |
|
229 | 229 |
|
230 | 230 |
if ($context['ticket_form']['num_replies'] && !empty($ticketinfo['id_first_msg'])) |
231 | 231 |
shd_setup_replies($ticketinfo['id_first_msg']); |
... | ... |
@@ -237,7 +237,7 @@ function shd_post_ticket() |
237 | 237 |
|
238 | 238 |
// Build the link tree and navigation |
239 | 239 |
$context['linktree'][] = array( |
240 |
- 'name' => $new_ticket ? $txt['shd_create_ticket'] : sprintf($txt['shd_edit_ticket_linktree'], $context['ticket_form']['link']), |
|
240 |
+ 'name' => $context['ticket_form']['is_new'] ? $txt['shd_create_ticket'] : sprintf($txt['shd_edit_ticket_linktree'], $context['ticket_form']['link']), |
|
241 | 241 |
); |
242 | 242 |
|
243 | 243 |
$context['page_title'] = $txt['shd_helpdesk']; |
... | ... |
@@ -438,10 +438,10 @@ function shd_save_ticket() |
438 | 438 |
if (!empty($context['ticket_form']['selecting_dept'])) |
439 | 439 |
shd_get_postable_depts(); |
440 | 440 |
|
441 |
- $context['log_action'] = $new_ticket ? 'newticket' : 'editticket'; |
|
441 |
+ $context['log_action'] = $context['ticket_form']['is_new'] ? 'newticket' : 'editticket'; |
|
442 | 442 |
$context['log_params']['subject'] = $context['ticket_form']['subject']; |
443 | 443 |
|
444 |
- $context['can_post_proxy'] = $new_ticket && isset($_REQUEST['proxy']) && shd_allowed_to('shd_post_proxy', $dept); |
|
444 |
+ $context['can_post_proxy'] = $context['ticket_form']['is_new'] && isset($_REQUEST['proxy']) && shd_allowed_to('shd_post_proxy', $dept); |
|
445 | 445 |
if ($context['can_post_proxy'] && !empty($_REQUEST['proxy_author'])) |
446 | 446 |
{ |
447 | 447 |
// OK, so we have a name... do we know this person? |
... | ... |
@@ -507,7 +507,7 @@ function shd_save_ticket() |
507 | 507 |
'body' => shd_format_text($_POST['shd_message']), |
508 | 508 |
); |
509 | 509 |
|
510 |
- if (!$new_ticket && !empty($ticketinfo['modified_time'])) |
|
510 |
+ if (!$context['ticket_form']['is_new'] && !empty($ticketinfo['modified_time'])) |
|
511 | 511 |
$context['ticket_form'] += array( |
512 | 512 |
'modified' => array( |
513 | 513 |
'name' => $ticketinfo['modified_name'], |
... | ... |
@@ -585,7 +585,7 @@ function shd_save_ticket() |
585 | 585 |
|
586 | 586 |
// Build the link tree and navigation |
587 | 587 |
$context['linktree'][] = array( |
588 |
- 'name' => $new_ticket ? $txt['shd_create_ticket'] : sprintf($txt['shd_edit_ticket_linktree'], $context['ticket_form']['link']), |
|
588 |
+ 'name' => $context['ticket_form']['is_new'] ? $txt['shd_create_ticket'] : sprintf($txt['shd_edit_ticket_linktree'], $context['ticket_form']['link']), |
|
589 | 589 |
); |
590 | 590 |
|
591 | 591 |
checkSubmitOnce('register'); |
... | ... |
@@ -595,7 +595,7 @@ function shd_save_ticket() |
595 | 595 |
// It all worked, w00t, so let's get ready to rumble |
596 | 596 |
$attachIDs = shd_handle_attachments(); |
597 | 597 |
|
598 |
- if ($new_ticket) |
|
598 |
+ if ($context['ticket_form']['is_new']) |
|
599 | 599 |
{ |
600 | 600 |
// Now to add the ticket details |
601 | 601 |
$posterOptions = array( |
... | ... |
@@ -663,7 +663,7 @@ function shd_save_ticket() |
663 | 663 |
'custom_fields' => !empty($context['ticket_form']['custom_fields']['ticket']) ? $context['ticket_form']['custom_fields']['ticket'] : array(), |
664 | 664 |
); |
665 | 665 |
|
666 |
- if ((bool) $ticketinfo['smileys_enabled'] == $context['ticket_form']['disable_smileys']) // since one is enabled, one is 'now disable'... |
|
666 |
+ if (isset($ticketinfo['smileys_enabled']) && (bool) $ticketinfo['smileys_enabled'] == $context['ticket_form']['disable_smileys']) // since one is enabled, one is 'now disable'... |
|
667 | 667 |
$msgOptions['smileys_enabled'] = !$context['ticket_form']['disable_smileys']; |
668 | 668 |
|
669 | 669 |
// This things don't trigger modified time |
... | ... |
@@ -2099,7 +2099,7 @@ function shd_handle_attachments() |
2099 | 2099 |
*/ |
2100 | 2100 |
function shd_posting_additional_options() |
2101 | 2101 |
{ |
2102 |
- global $context, $modSettings, $txt, $options, $settings, $new_ticket; |
|
2102 |
+ global $context, $modSettings, $txt, $options, $settings; |
|
2103 | 2103 |
|
2104 | 2104 |
$context['ticket_form']['additional_opts'] = array( |
2105 | 2105 |
'goback' => array( |
2106 | 2106 |