jdarwood007 commited on 2023-06-11 11:34:25
Showing 6 changed files, with 22 additions and 14 deletions.
Remove extra closing div (Fixes #179) Correct issue with helpdesk attachments being caught up in repair actions (Fixes #178) Use min-width for left column to ensure extra long posts do not shrink the viewport (Fixes #181) Fixes undefined indexes for modified data Fix Parameter positioning (Fixes #180)
... | ... |
@@ -3,10 +3,17 @@ |
3 | 3 |
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/"> |
4 | 4 |
<id>SimpleDeskTeam:SimpleDesk</id> |
5 | 5 |
<name>SimpleDesk - Integrated Helpdesk for Simple Machines Forum</name> |
6 |
- <version>2.1.1</version> |
|
6 |
+ <version>2.1.2</version> |
|
7 | 7 |
<type>modification</type> |
8 | 8 |
|
9 |
- <upgrade from="2.1.0" for="2.1.3-2.1.99"> |
|
9 |
+ <!-- (Minor Upgrade) This should just be the files we need to get to the current. --> |
|
10 |
+ <upgrade from="2.1.1" for="2.1.4-2.1.99"> |
|
11 |
+ <require-file name="sd_template/SimpleDesk.template.php" destination="$themedir/sd_template" /> |
|
12 |
+ <hook hook="integrate_repair_attachments_nomsg" function="shd_repair_attachments_nomsg" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" /> |
|
13 |
+ </upgrade> |
|
14 |
+ |
|
15 |
+ <!-- (Large upgrade) This should always indicate the lowest package we can upgrade from and all changes to the current --> |
|
16 |
+ <upgrade from="2.1.0" for="2.1.4-2.1.99"> |
|
10 | 17 |
<!-- language files --> |
11 | 18 |
<require-dir name="sd_language" destination="$themes_dir/default/languages" /> |
12 | 19 |
|
... | ... |
@@ -38,7 +45,7 @@ |
38 | 45 |
<require-dir name="sd_plugins_lang" destination="$languagedir" /> |
39 | 46 |
</upgrade> |
40 | 47 |
|
41 |
- <install for="2.1.3-2.1.99"> |
|
48 |
+ <install for="2.1.4-2.1.99"> |
|
42 | 49 |
<!-- readme files --> |
43 | 50 |
<readme lang="english" parsebbc="true" type="file">language-readme/readme.english.txt</readme> |
44 | 51 |
|
... | ... |
@@ -95,6 +102,7 @@ |
95 | 102 |
<hook hook="integrate_remove_attachments" function="shd_remove_attachments" file="$sourcedir/sd_source/Subs-SimpleDeskAdmin.php" /> |
96 | 103 |
<hook hook="integrate_attachments_browse" function="shd_attachments_browse" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" /> |
97 | 104 |
<hook hook="integrate_attachment_remove" function="shd_attachment_remove" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" /> |
105 |
+ <hook hook="integrate_repair_attachments_nomsg" function="shd_repair_attachments_nomsg" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" /> |
|
98 | 106 |
|
99 | 107 |
<!-- Admin Section: Packages --> |
100 | 108 |
<hook hook="integrate_packages_sort_id" function="shd_packages_sort_id" file="$sourcedir/sd_source/Subs-SimpleDeskPackages.php" /> |
... | ... |
@@ -132,7 +140,7 @@ |
132 | 140 |
<credits url="https://www.simpledesk.net" license="BSD 3-Clause" licenseurl="https://github.com/SimpleMachines/SimpleDesk/blob/master/license.txt" copyright="2010-2021">Simple Desk</credits> |
133 | 141 |
</install> |
134 | 142 |
|
135 |
- <uninstall for="2.1.3-2.1.99"> |
|
143 |
+ <uninstall for="2.1.4-2.1.99"> |
|
136 | 144 |
<!-- database changes, undone --> |
137 | 145 |
<database>uninstall-sd-optional.php</database> |
138 | 146 |
<code type="file">uninstall-sd-required.php</code> |
... | ... |
@@ -160,6 +168,7 @@ |
160 | 168 |
<hook reverse="true" hook="integrate_remove_attachments" function="shd_remove_attachments" file="$sourcedir/sd_source/Subs-SimpleDeskAdmin.php" /> |
161 | 169 |
<hook reverse="true" hook="integrate_attachments_browse" function="shd_attachments_browse" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" /> |
162 | 170 |
<hook reverse="true" hook="integrate_attachment_remove" function="shd_attachment_remove" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" /> |
171 |
+ <hook reverse="true" hook="integrate_repair_attachments_nomsg" function="shd_repair_attachments_nomsg" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" /> |
|
163 | 172 |
|
164 | 173 |
<!-- Admin Section: Packages --> |
165 | 174 |
<hook reverse="true" hook="integrate_packages_sort_id" function="shd_packages_sort_id" file="$sourcedir/sd_source/Subs-SimpleDeskPackages.php" /> |
... | ... |
@@ -46,15 +46,15 @@ function shd_repair_attachments_nomsg(&$ignore_ids, $min_substep, $max_substep) |
46 | 46 |
FROM {db_prefix}attachments AS a |
47 | 47 |
LEFT JOIN {db_prefix}helpdesk_attachments AS hda ON (hda.id_attach = a.id_attach) |
48 | 48 |
LEFT JOIN {db_prefix}helpdesk_ticket_replies AS hdtr ON (hdtr.id_msg = hda.id_msg) |
49 |
- WHERE a.id_attach BETWEEN {int:substep} AND {int:max_substep} + 499 |
|
49 |
+ WHERE a.id_attach BETWEEN {int:substep} AND {int:max_substep} |
|
50 | 50 |
AND a.id_member = {int:no_member} |
51 |
- AND a.id_msg != {int:no_msg} |
|
51 |
+ AND a.id_msg = {int:no_msg} |
|
52 | 52 |
AND hdtr.id_msg IS NOT NULL', |
53 | 53 |
array( |
54 | 54 |
'no_member' => 0, |
55 | 55 |
'no_msg' => 0, |
56 | 56 |
'substep' => $min_substep, |
57 |
- 'max_substep' => $min_substep >= $max_substep ? $min_substep + 499 : $max_substep, |
|
57 |
+ 'max_substep' => $min_substep >= $max_substep ? $min_substep + 500 : $max_substep, |
|
58 | 58 |
'ignore_ids' => $ignore_ids, |
59 | 59 |
) |
60 | 60 |
); |
... | ... |
@@ -981,7 +981,7 @@ function shd_get_postable_depts() |
981 | 981 |
/** |
982 | 982 |
* Set a ticket to on hold or restore to the proper status. |
983 | 983 |
* |
984 |
- * @param bool $on_hold (default true) Whether this ticket should be on hold or not. |
|
984 |
+ * @param bool $on_hold (default false) Whether this ticket should be on hold or not. |
|
985 | 985 |
* @param array &$ticketOptions - a hash array by reference, stating one or more details necessary to change on a ticket: |
986 | 986 |
* <ul> |
987 | 987 |
* <li>id: Required in all cases, numeric ticket id that the edit relates to</li> |
... | ... |
@@ -995,10 +995,12 @@ function shd_get_postable_depts() |
995 | 995 |
* @return bool True on success, false on failure. |
996 | 996 |
* @since 2.1 |
997 | 997 |
*/ |
998 |
-function shd_ticket_on_hold($on_hold = false, &$ticketOptions) |
|
998 |
+function shd_ticket_on_hold($on_hold, &$ticketOptions) |
|
999 | 999 |
{ |
1000 | 1000 |
global $context, $smcFunc; |
1001 | 1001 |
|
1002 |
+ $on_hold = !is_bool($on_hold) ? false : $on_hold; |
|
1003 |
+ |
|
1002 | 1004 |
$current_status = !isset($context['ticket_form']['status']) ? 0 : $context['ticket_form']['status']; |
1003 | 1005 |
$new_status = $current_status; |
1004 | 1006 |
|
... | ... |
@@ -562,7 +562,7 @@ function template_ticket_footer() |
562 | 562 |
if (!empty($modSettings['show_modify']) && !empty($context['ticket_form']['modified'])) |
563 | 563 |
echo ' |
564 | 564 |
<div class="smalltext shd_modified"> |
565 |
- « <em>', sprintf($txt['last_edit_by'], $context['ticket']['modified']['time'], $context['ticket']['modified']['link']), '</em> » |
|
565 |
+ « <em>', sprintf($txt['last_edit_by'], $context['ticket_form']['modified']['time'], $context['ticket_form']['modified']['link']), '</em> » |
|
566 | 566 |
</div>'; |
567 | 567 |
|
568 | 568 |
echo ' |