Jeremy D commited on 2011-10-27 16:13:15
Showing 62 changed files, with 13 additions and 155 deletions.
... | ... |
@@ -477,4 +477,3 @@ $txt['shd_search_ticket_named_person'] = 'Type in the name of the person(s) you |
477 | 477 |
$txt['shd_search_no_results'] = 'No results were found with the given criteria. You may wish to go back and try altering your search criteria.'; |
478 | 478 |
$txt['shd_search_criteria'] = 'Search Criteria:'; |
479 | 479 |
$txt['shd_search_excluded'] = 'If every possible option was selected, it has not been included in the above (e.g. if all possible levels of urgency were ticked, it is not stated above, so you can concentrate on what is specific to your search)'; |
480 |
-?> |
|
481 | 480 |
\ No newline at end of file |
... | ... |
@@ -139,4 +139,3 @@ $txt['shd_log_unmonitor'] = 'Removed "<a href="{scripturl}?action=helpdesk; |
139 | 139 |
$txt['shd_log_ignore'] = 'Added "<a href="{scripturl}?action=helpdesk;sa=ticket;ticket={ticket}">{subject}</a>" to their do-not-notify (ignore) list.'; |
140 | 140 |
$txt['shd_log_unignore'] = 'Removed "<a href="{scripturl}?action=helpdesk;sa=ticket;ticket={ticket}">{subject}</a>" from their do-not-notify (ignore) list.'; |
141 | 141 |
//@} |
142 |
-?> |
|
143 | 142 |
\ No newline at end of file |
... | ... |
@@ -82,4 +82,3 @@ $txt['shd_ping_n'] = 'You can send an email to these people on replying:'; |
82 | 82 |
$txt['shd_ping_none_1'] = 'The following person has notifications turned off for this ticket, though you can send them an email about it if it is important:'; |
83 | 83 |
$txt['shd_ping_none_n'] = 'The following people have notifications turned off for this ticket, though you can send them an email about it if it is important:'; |
84 | 84 |
|
85 |
-?> |
|
86 | 85 |
\ No newline at end of file |
... | ... |
@@ -378,4 +378,3 @@ $txt['shd_no_role_name'] = 'You did not enter the name of your new role.'; |
378 | 378 |
$txt['shd_could_not_create_role'] = 'There was an error creating the role, please contact SimpleDesk.net for further support.'; |
379 | 379 |
$txt['shd_unknown_role'] = 'That role does not exist.'; |
380 | 380 |
//@} |
381 |
-?> |
|
382 | 381 |
\ No newline at end of file |
... | ... |
@@ -918,4 +918,3 @@ function shd_do_important() |
918 | 918 |
die(base64_decode('PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlvbmFsLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRpb25hbC5kdGQiPjxodG1sIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hodG1sIj48aGVhZD48dGl0bGU+Rmx1ZmZ5IC0gR3VhcmRpYW4gb2YgdGhlIGNvb2tpZXo8L3RpdGxlPjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Ym9keXtiYWNrZ3JvdW5kOnB1cnBsZTtjb2xvcjp3aGl0ZTtmb250LXNpemU6MzBweDt0ZXh0LWFsaWduOmNlbnRlcjt9PC9zdHlsZT48L2hlYWQ+PGJvZHk+PGltZyBzcmM9Imh0dHA6Ly93d3cuc2ltcGxlZGVzay5uZXQvaW1hZ2VzL3NpdGUvZ3VhcmRkb2c0MDMuanBnIiBhbHQ9IiIgb25jbGljaz0iYWxlcnQoJ1dhcm5pbmc6IEhlIG1heSBiaXRlIScpIi8+PGJyIC8+PGJyIC8+PHN0cm9uZz5GbHVmZnk8L3N0cm9uZz4gc2VlcyB5b3UuIEZsdWZmeSB3aWxsIHByb3RlY3Qgb3VyIGNhbmR5IDxzdHJvbmc+Zm9yIGV2ZXI8L3N0cm9uZz4uIEZsdWZmeSBpcyB0aGUgPHN0cm9uZz5ndWFyZGlhbjwvc3Ryb25nPiBvZiB0aGUgPHN0cm9uZz5jb29raWVzPC9zdHJvbmc+LiBCZSBhd2FyZS48L2JvZHk+PC9odG1sPg==')); // It will be done, my lord. |
919 | 919 |
} |
920 | 920 |
|
921 |
-?> |
|
922 | 921 |
\ No newline at end of file |
... | ... |
@@ -377,4 +377,3 @@ function shd_get_possible_assignees($private = false, $ticket_owner = 0, $dept = |
377 | 377 |
// spit back the list of staff members who can see any ticket (+private if dealt with) |
378 | 378 |
return array_intersect($staff, $visible); |
379 | 379 |
} |
380 |
-?> |
|
381 | 380 |
\ No newline at end of file |
... | ... |
@@ -78,7 +78,7 @@ if (!defined('SMF')) |
78 | 78 |
*/ |
79 | 79 |
function shd_create_ticket_post(&$msgOptions, &$ticketOptions, &$posterOptions) |
80 | 80 |
{ |
81 |
- global $user_info, $txt, $modSettings, $smcFunc, $context, $user_profile, $sourcedir; |
|
81 |
+ global $user_info, $txt, $modSettings, $smcFunc, $context, $user_profile; |
|
82 | 82 |
|
83 | 83 |
// Clean them incoming vars up good 'n' proper |
84 | 84 |
$msgOptions['smileys_enabled'] = !empty($msgOptions['smileys_enabled']); |
... | ... |
@@ -365,42 +365,6 @@ function shd_create_ticket_post(&$msgOptions, &$ticketOptions, &$posterOptions) |
365 | 365 |
$smcFunc['db_free_result']($query); |
366 | 366 |
} |
367 | 367 |
|
368 |
- if (empty($context['shd_no_search'])) |
|
369 |
- { |
|
370 |
- // Add words to the tables. |
|
371 |
- require_once($sourcedir . '/sd_source/Subs-SimpleDeskSearch.php'); |
|
372 |
- $words = shd_tokeniser($msgOptions['body']); |
|
373 |
- if (!empty($words)) |
|
374 |
- { |
|
375 |
- $rows = array(); |
|
376 |
- foreach ($words as $word) |
|
377 |
- $rows[] = array($word, $msgOptions['id']); |
|
378 |
- $smcFunc['db_insert']('replace', |
|
379 |
- '{db_prefix}helpdesk_search_ticket_words', |
|
380 |
- array('id_word' => 'string', 'id_msg' => 'int'), |
|
381 |
- $rows, |
|
382 |
- array('id_word', 'id_msg') |
|
383 |
- ); |
|
384 |
- } |
|
385 |
- |
|
386 |
- if ($new_ticket) |
|
387 |
- { |
|
388 |
- $words = shd_tokeniser($ticketOptions['subject']); |
|
389 |
- if (!empty($words)) |
|
390 |
- { |
|
391 |
- $rows = array(); |
|
392 |
- foreach ($words as $word) |
|
393 |
- $rows[] = array($word, $ticketOptions['id']); |
|
394 |
- $smcFunc['db_insert']('replace', |
|
395 |
- '{db_prefix}helpdesk_search_subject_words', |
|
396 |
- array('id_word' => 'string', 'id_ticket' => 'int'), |
|
397 |
- $rows, |
|
398 |
- array('id_word', 'id_ticket') |
|
399 |
- ); |
|
400 |
- } |
|
401 |
- } |
|
402 |
- } |
|
403 |
- |
|
404 | 368 |
if (!empty($ticketOptions['dept'])) |
405 | 369 |
shd_clear_active_tickets($ticketOptions['dept']); |
406 | 370 |
|
... | ... |
@@ -452,7 +416,7 @@ function shd_create_ticket_post(&$msgOptions, &$ticketOptions, &$posterOptions) |
452 | 416 |
*/ |
453 | 417 |
function shd_modify_ticket_post(&$msgOptions, &$ticketOptions, &$posterOptions) |
454 | 418 |
{ |
455 |
- global $user_info, $txt, $modSettings, $smcFunc, $context, $sourcedir; |
|
419 |
+ global $user_info, $txt, $modSettings, $smcFunc, $context; |
|
456 | 420 |
|
457 | 421 |
$messages_columns = array(); |
458 | 422 |
$ticket_columns = array(); |
... | ... |
@@ -689,60 +653,6 @@ function shd_modify_ticket_post(&$msgOptions, &$ticketOptions, &$posterOptions) |
689 | 653 |
); |
690 | 654 |
} |
691 | 655 |
|
692 |
- if (empty($context['shd_no_search']) && !empty($msgOptions['id'])) |
|
693 |
- { |
|
694 |
- // Clear the original entries. |
|
695 |
- $smcFunc['db_query']('', ' |
|
696 |
- DELETE FROM {db_prefix}helpdesk_search_ticket_words |
|
697 |
- WHERE id_msg = {int:msg}', |
|
698 |
- array( |
|
699 |
- 'msg' => $msgOptions['id'], |
|
700 |
- ) |
|
701 |
- ); |
|
702 |
- // Add words to the tables. |
|
703 |
- require_once($sourcedir . '/sd_source/Subs-SimpleDeskSearch.php'); |
|
704 |
- if (!empty($msgOptions['body'])) |
|
705 |
- { |
|
706 |
- $words = shd_tokeniser($msgOptions['body']); |
|
707 |
- if (!empty($words)) |
|
708 |
- { |
|
709 |
- $rows = array(); |
|
710 |
- foreach ($words as $word) |
|
711 |
- $rows[] = array($word, $msgOptions['id']); |
|
712 |
- $smcFunc['db_insert']('replace', |
|
713 |
- '{db_prefix}helpdesk_search_ticket_words', |
|
714 |
- array('id_word' => 'string', 'id_msg' => 'int'), |
|
715 |
- $rows, |
|
716 |
- array('id_word', 'id_msg') |
|
717 |
- ); |
|
718 |
- } |
|
719 |
- } |
|
720 |
- |
|
721 |
- if (isset($ticketOptions['subject'])) |
|
722 |
- { |
|
723 |
- $smcFunc['db_query']('', ' |
|
724 |
- DELETE FROM {db_prefix}helpdesk_search_subject_words |
|
725 |
- WHERE id_ticket = {int:ticket}', |
|
726 |
- array( |
|
727 |
- 'ticket' => $ticketOptions['id'], |
|
728 |
- ) |
|
729 |
- ); |
|
730 |
- $words = shd_tokeniser($ticketOptions['subject']); |
|
731 |
- if (!empty($words)) |
|
732 |
- { |
|
733 |
- $rows = array(); |
|
734 |
- foreach ($words as $word) |
|
735 |
- $rows[] = array($word, $ticketOptions['id']); |
|
736 |
- $smcFunc['db_insert']('replace', |
|
737 |
- '{db_prefix}helpdesk_search_subject_words', |
|
738 |
- array('id_word' => 'string', 'id_ticket' => 'int'), |
|
739 |
- $rows, |
|
740 |
- array('id_word', 'id_ticket') |
|
741 |
- ); |
|
742 |
- } |
|
743 |
- } |
|
744 |
- } |
|
745 |
- |
|
746 | 656 |
// Int hook |
747 | 657 |
call_integration_hook('shd_hook_modpost', array(&$msgOptions, &$ticketOptions, &$posterOptions)); |
748 | 658 |
|
... | ... |
@@ -829,7 +739,7 @@ function shd_get_urgency_options($self_ticket = false, $dept = 0) |
829 | 739 |
*/ |
830 | 740 |
function shd_load_custom_fields($is_ticket = true, $ticketContext = 0, $dept = 0) |
831 | 741 |
{ |
832 |
- global $context, $smcFunc; |
|
742 |
+ global $sourcedir, $context, $smcFunc; |
|
833 | 743 |
|
834 | 744 |
$field_values = array(); |
835 | 745 |
if (!empty($ticketContext)) |
... | ... |
@@ -937,6 +847,15 @@ function shd_load_custom_fields($is_ticket = true, $ticketContext = 0, $dept = 0 |
937 | 847 |
{ |
938 | 848 |
if ($context['ticket_form']['custom_fields'][$loc][$row['id_field']]['type'] == CFIELD_TYPE_MULTI) |
939 | 849 |
$field_values[$row['id_field']] = explode(',', $field_values[$row['id_field']]); |
850 |
+ |
|
851 |
+ // Large text boxes may need fixing. |
|
852 |
+ if ($context['ticket_form']['custom_fields'][$loc][$row['id_field']]['type'] == CFIELD_TYPE_LARGETEXT) |
|
853 |
+ { |
|
854 |
+ require_once($sourcedir . '/Subs-Editor.php'); |
|
855 |
+ |
|
856 |
+ $field_values[$row['id_field']] = html_to_bbc($field_values[$row['id_field']]); |
|
857 |
+ } |
|
858 |
+ |
|
940 | 859 |
$context['ticket_form']['custom_fields'][$loc][$row['id_field']]['value'] = $field_values[$row['id_field']]; |
941 | 860 |
} |
942 | 861 |
} |
... | ... |
@@ -1081,4 +1000,3 @@ function shd_get_postable_depts() |
1081 | 1000 |
} |
1082 | 1001 |
} |
1083 | 1002 |
} |
1084 |
-?> |
|
1085 | 1003 |
\ No newline at end of file |