Merge master into smf21
jdarwood007

jdarwood007 commited on 2023-06-11 11:45:03
Showing 8 changed files, with 87 additions and 14 deletions.

... ...
@@ -0,0 +1,29 @@
1
+project_id_env: CROWDIN_PROJECT_ID
2
+api_token_env: CROWDIN_API_TOKEN
3
+base_path: .
4
+base_url: 'https://api.crowdin.com'
5
+preserve_hierarchy: 1
6
+commit_message: New translations for %language%
7
+append_commit_message: 
8
+pull_request_title: Crowdin Language Update
9
+files:
10
+  - source: sd_language/SimpleDesk.english.php
11
+    translation: /sd_language/SimpleDesk.%language%.php
12
+  - source: sd_language/SimpleDeskAdmin.english.php
13
+    translation: /sd_language/SimpleDeskAdmin.%language%.php
14
+  - source: sd_language/SimpleDeskLogAction.english.php
15
+    translation: /sd_language/SimpleDeskLogAction.%language%.php
16
+  - source: sd_language/SimpleDeskNotifications.english.php
17
+    translation: /sd_language/SimpleDeskNotifications.%language%.php
18
+  - source: sd_language/SimpleDeskPermissions.english.php
19
+    translation: /sd_language/SimpleDeskPermissions.%language%.php
20
+  - source: sd_language/SimpleDeskProfile.english.php
21
+    translation: /sd_language/SimpleDeskProfile.%language%.php
22
+  - source: sd_language/SimpleDeskWho.english.php
23
+    translation: /sd_language/SimpleDeskWho.%language%.php
24
+  - source: language-readme/readme.english.txt
25
+    translation: /language-readme/readme.%language%.txt
26
+  - source: sd_plugins_lang/SDPluginFrontPage.english.php
27
+    translation: /sd_plugins_lang/SDPluginFrontPage.%language%.php
28
+  - source: sd_plugins_lang/SDPluginStats.english.php
29
+    translation: /sd_plugins_lang/SDPluginStats.%language%.php
... ...
@@ -0,0 +1,29 @@
1
+# Security Policy
2
+
3
+## Supported Versions
4
+
5
+| Version | Supported          |
6
+| ------- | ------------------ |
7
+| 2.1.x   | :white_check_mark: |
8
+| 2.0.x   | :white_check_mark: |
9
+| 1.x     | :x:                |
10
+
11
+## Reporting a Vulnerability
12
+
13
+To report a security issue use [Security Advisories](https://github.com/SimpleMachines/SimpleDesk/security/advisories).
14
+
15
+## The process
16
+When we receive your report, it will be validated with our team.  This includes testing the vulnerabilities.  We don't require a Proof of Concept script/tool, but we do welcome them as they can improve the ability to validate the report and test against the patches.
17
+
18
+Once validated, our team will work on patching.
19
+
20
+Due to our small team size and because we are all volunteers, we do not have timelines we can give beyond estimates.
21
+
22
+## Credits
23
+We are open to giving credits to individuals or organizations for proper reporting and keeping the issue private until we have made the release.  We will ask you after validation on this.  We reserve the right to refuse or limit how we credits.  We typically do not provide credits for publicly known vulnerabilities or if the information is released prior to us making the official release.
24
+
25
+## Bounties
26
+This project does not have any source of income and we do not have the funds to pay bounties.
27
+
28
+# Thank you
29
+Thank you to all those who help us by scanning our repositories and reviewing our code.  Your efforts go a long way to ensuring our community is receiving a secure product to use.
... ...
@@ -112,7 +112,7 @@ h3.ticketheader img {
112 112
 
113 113
 /* Ticket details (Left-floated box) */
114 114
 .shd_ticket_side_column {
115
-	width: 23%;
115
+	min-width: 23%;
116 116
 	padding: 0;
117 117
 }
118 118
 .shd_ticketdetails {
... ...
@@ -3,10 +3,24 @@
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_source/Subs-SimpleDeskManageAttachments.php" destination="$sourcedir/sd_source" />
12
+		<require-file name="sd_source/Subs-SimpleDeskPost.php" destination="$sourcedir/sd_source" />
13
+
14
+		<require-file name="sd_template/SimpleDesk.template.php" destination="$themedir/sd_template" />
15
+		<require-file name="sd_template/SimpleDesk-Post.template.php" destination="$themedir/sd_template" />
16
+
17
+		<require-file name="css/helpdesk.css" destination="$themedir/css" />
18
+
19
+		<hook hook="integrate_repair_attachments_nomsg" function="shd_repair_attachments_nomsg" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
20
+	</upgrade>
21
+
22
+	<!-- (Large upgrade) This should always indicate the lowest package we can upgrade from and all changes to the current -->
23
+	<upgrade from="2.1.0" for="2.1.4-2.1.99">
10 24
 		<!-- language files -->
11 25
 		<require-dir name="sd_language" destination="$themes_dir/default/languages" />
12 26
 
... ...
@@ -38,7 +52,7 @@
38 52
 		<require-dir name="sd_plugins_lang" destination="$languagedir" />
39 53
 	</upgrade>
40 54
 
41
-	<install for="2.1.3-2.1.99">
55
+	<install for="2.1.4-2.1.99">
42 56
 		<!-- readme files -->
43 57
 		<readme lang="english" parsebbc="true" type="file">language-readme/readme.english.txt</readme>
44 58
 
... ...
@@ -95,6 +109,7 @@
95 109
 		<hook hook="integrate_remove_attachments" function="shd_remove_attachments" file="$sourcedir/sd_source/Subs-SimpleDeskAdmin.php" />
96 110
 		<hook hook="integrate_attachments_browse" function="shd_attachments_browse" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
97 111
 		<hook hook="integrate_attachment_remove" function="shd_attachment_remove" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
112
+		<hook hook="integrate_repair_attachments_nomsg" function="shd_repair_attachments_nomsg" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
98 113
 
99 114
 			<!-- Admin Section: Packages -->
100 115
 		<hook hook="integrate_packages_sort_id" function="shd_packages_sort_id" file="$sourcedir/sd_source/Subs-SimpleDeskPackages.php" />
... ...
@@ -132,7 +147,7 @@
132 147
 		<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 148
 	</install>
134 149
 
135
-	<uninstall for="2.1.3-2.1.99">
150
+	<uninstall for="2.1.4-2.1.99">
136 151
 		<!-- database changes, undone -->
137 152
 		<database>uninstall-sd-optional.php</database>
138 153
 		<code type="file">uninstall-sd-required.php</code>
... ...
@@ -160,6 +175,7 @@
160 175
 		<hook reverse="true" hook="integrate_remove_attachments" function="shd_remove_attachments" file="$sourcedir/sd_source/Subs-SimpleDeskAdmin.php" />
161 176
 		<hook reverse="true" hook="integrate_attachments_browse" function="shd_attachments_browse" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
162 177
 		<hook reverse="true" hook="integrate_attachment_remove" function="shd_attachment_remove" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
178
+		<hook reverse="true" hook="integrate_repair_attachments_nomsg" function="shd_repair_attachments_nomsg" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
163 179
 
164 180
 			<!-- Admin Section: Packages -->
165 181
 		<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
-							&#171; <em>', sprintf($txt['last_edit_by'], $context['ticket']['modified']['time'], $context['ticket']['modified']['link']), '</em> &#187;
565
+							&#171; <em>', sprintf($txt['last_edit_by'], $context['ticket_form']['modified']['time'], $context['ticket_form']['modified']['link']), '</em> &#187;
566 566
 						</div>';
567 567
 
568 568
 	echo '
... ...
@@ -87,9 +87,6 @@ function template_main()
87 87
 			template_ticket_block();
88 88
 	}
89 89
 
90
-	echo '
91
-		</div>';
92
-
93 90
 	//echo 'I\'m alive!!!!!!!!!!1111oneone'; 	- I had to save this :P
94 91
 }
95 92
 
96 93