jdarwood007 commited on 2019-02-23 15:55:02
Showing 4 changed files, with 7 additions and 6 deletions.
... | ... |
@@ -83,14 +83,12 @@ function template_shd_frontpage_admin() |
83 | 83 |
</dt> |
84 | 84 |
<dd style="width: 68%;">'; |
85 | 85 |
|
86 |
- $editor_context = &$context['controls']['richedit'][$context['post_box_name']]; |
|
87 |
- |
|
88 | 86 |
// The postbox |
89 | 87 |
echo ' |
90 | 88 |
<div id="shd_bbcbox"', ($modSettings['shdp_frontpage_type'] == 'php' ? ' style="display:none;"' : ''), '></div> |
91 | 89 |
<div id="shd_smileybox"', ($modSettings['shdp_frontpage_type'] == 'php' ? ' style="display:none;"' : ''), '></div>'; |
92 | 90 |
|
93 |
- echo template_control_richedit($context['post_box_name'], 'shd_smileybox', 'shd_bbcbox'); |
|
91 |
+ template_control_richedit($context['post_box_name'], true, true); |
|
94 | 92 |
|
95 | 93 |
echo ' |
96 | 94 |
</dd> |
... | ... |
@@ -1028,7 +1028,7 @@ function shd_attachment_info($attach_info) |
1028 | 1028 |
$thumb_mime = 'image/' . $thumb_ext; |
1029 | 1029 |
|
1030 | 1030 |
$thumb_filename = $attach_info['filename'] . '_thumb'; |
1031 |
- $thumb_hash = getAttachmentFilename($thumb_filename, false, null, true); |
|
1031 |
+ $thumb_hash = getAttachmentFilename($thumb_filename, 0, null, true); |
|
1032 | 1032 |
|
1033 | 1033 |
$old_id_thumb = $attach_info['id_thumb']; |
1034 | 1034 |
// Add this beauty to the database. |
... | ... |
@@ -371,6 +371,8 @@ function shd_save_ticket() |
371 | 371 |
'last_msg' => 0, |
372 | 372 |
'link' => '', |
373 | 373 |
); |
374 |
+ |
|
375 |
+ $context['can_solve'] = false; |
|
374 | 376 |
} |
375 | 377 |
else |
376 | 378 |
{ |
... | ... |
@@ -401,6 +403,8 @@ function shd_save_ticket() |
401 | 403 |
'last_msg' => $ticketinfo['id_last_msg'], |
402 | 404 |
'link' => '<a href="' . $scripturl . '?action=helpdesk;sa=ticket;ticket=' . $context['ticket_id'] . '">' . $ticketinfo['subject'] . '</a>', |
403 | 405 |
); |
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'])); |
|
404 | 408 |
} |
405 | 409 |
|
406 | 410 |
$context['ticket_form'] += array( |
... | ... |
@@ -434,7 +438,6 @@ function shd_save_ticket() |
434 | 438 |
if (!empty($context['ticket_form']['selecting_dept'])) |
435 | 439 |
shd_get_postable_depts(); |
436 | 440 |
|
437 |
- $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'])); |
|
438 | 441 |
$context['log_action'] = $new_ticket ? 'newticket' : 'editticket'; |
439 | 442 |
$context['log_params']['subject'] = $context['ticket_form']['subject']; |
440 | 443 |
|
... | ... |
@@ -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_resource($attachRequest) && empty($_REQUEST['ticket'])) |
|
41 |
+ if (!is_null($attachRequest) && 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 |