Skip to content

Commit dfca745

Browse files
committed
Merge master into smf21
1 parent ea60299 commit dfca745

File tree

8 files changed

+87
-14
lines changed

8 files changed

+87
-14
lines changed

.crowdin.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

SECURITY.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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.

css/helpdesk.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ h3.ticketheader img {
112112

113113
/* Ticket details (Left-floated box) */
114114
.shd_ticket_side_column {
115-
width: 23%;
115+
min-width: 23%;
116116
padding: 0;
117117
}
118118
.shd_ticketdetails {

package-info.xml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,24 @@
33
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
44
<id>SimpleDeskTeam:SimpleDesk</id>
55
<name>SimpleDesk - Integrated Helpdesk for Simple Machines Forum</name>
6-
<version>2.1.1</version>
6+
<version>2.1.2</version>
77
<type>modification</type>
88

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">
1024
<!-- language files -->
1125
<require-dir name="sd_language" destination="$themes_dir/default/languages" />
1226

@@ -38,7 +52,7 @@
3852
<require-dir name="sd_plugins_lang" destination="$languagedir" />
3953
</upgrade>
4054

41-
<install for="2.1.3-2.1.99">
55+
<install for="2.1.4-2.1.99">
4256
<!-- readme files -->
4357
<readme lang="english" parsebbc="true" type="file">language-readme/readme.english.txt</readme>
4458

@@ -95,6 +109,7 @@
95109
<hook hook="integrate_remove_attachments" function="shd_remove_attachments" file="$sourcedir/sd_source/Subs-SimpleDeskAdmin.php" />
96110
<hook hook="integrate_attachments_browse" function="shd_attachments_browse" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
97111
<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" />
98113

99114
<!-- Admin Section: Packages -->
100115
<hook hook="integrate_packages_sort_id" function="shd_packages_sort_id" file="$sourcedir/sd_source/Subs-SimpleDeskPackages.php" />
@@ -132,7 +147,7 @@
132147
<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>
133148
</install>
134149

135-
<uninstall for="2.1.3-2.1.99">
150+
<uninstall for="2.1.4-2.1.99">
136151
<!-- database changes, undone -->
137152
<database>uninstall-sd-optional.php</database>
138153
<code type="file">uninstall-sd-required.php</code>
@@ -160,6 +175,7 @@
160175
<hook reverse="true" hook="integrate_remove_attachments" function="shd_remove_attachments" file="$sourcedir/sd_source/Subs-SimpleDeskAdmin.php" />
161176
<hook reverse="true" hook="integrate_attachments_browse" function="shd_attachments_browse" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
162177
<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" />
163179

164180
<!-- Admin Section: Packages -->
165181
<hook reverse="true" hook="integrate_packages_sort_id" function="shd_packages_sort_id" file="$sourcedir/sd_source/Subs-SimpleDeskPackages.php" />

sd_source/Subs-SimpleDeskManageAttachments.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ function shd_repair_attachments_nomsg(&$ignore_ids, $min_substep, $max_substep)
4646
FROM {db_prefix}attachments AS a
4747
LEFT JOIN {db_prefix}helpdesk_attachments AS hda ON (hda.id_attach = a.id_attach)
4848
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}
5050
AND a.id_member = {int:no_member}
51-
AND a.id_msg != {int:no_msg}
51+
AND a.id_msg = {int:no_msg}
5252
AND hdtr.id_msg IS NOT NULL',
5353
array(
5454
'no_member' => 0,
5555
'no_msg' => 0,
5656
'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,
5858
'ignore_ids' => $ignore_ids,
5959
)
6060
);

sd_source/Subs-SimpleDeskPost.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ function shd_get_postable_depts()
981981
/**
982982
* Set a ticket to on hold or restore to the proper status.
983983
*
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.
985985
* @param array &$ticketOptions - a hash array by reference, stating one or more details necessary to change on a ticket:
986986
* <ul>
987987
* <li>id: Required in all cases, numeric ticket id that the edit relates to</li>
@@ -995,10 +995,12 @@ function shd_get_postable_depts()
995995
* @return bool True on success, false on failure.
996996
* @since 2.1
997997
*/
998-
function shd_ticket_on_hold($on_hold = false, &$ticketOptions)
998+
function shd_ticket_on_hold($on_hold, &$ticketOptions)
999999
{
10001000
global $context, $smcFunc;
10011001

1002+
$on_hold = !is_bool($on_hold) ? false : $on_hold;
1003+
10021004
$current_status = !isset($context['ticket_form']['status']) ? 0 : $context['ticket_form']['status'];
10031005
$new_status = $current_status;
10041006

sd_template/SimpleDesk-Post.template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ function template_ticket_footer()
562562
if (!empty($modSettings['show_modify']) && !empty($context['ticket_form']['modified']))
563563
echo '
564564
<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;
566566
</div>';
567567

568568
echo '

sd_template/SimpleDesk.template.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ function template_main()
8787
template_ticket_block();
8888
}
8989

90-
echo '
91-
</div>';
92-
9390
//echo 'I\'m alive!!!!!!!!!!1111oneone'; - I had to save this :P
9491
}
9592

0 commit comments

Comments
 (0)