Skip to content

Commit

Permalink
Merge master into smf21
Browse files Browse the repository at this point in the history
  • Loading branch information
jdarwood007 committed Jun 11, 2023
1 parent ea60299 commit dfca745
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 14 deletions.
29 changes: 29 additions & 0 deletions .crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_API_TOKEN
base_path: .
base_url: 'https://api.crowdin.com'
preserve_hierarchy: 1
commit_message: New translations for %language%
append_commit_message:
pull_request_title: Crowdin Language Update
files:
- source: sd_language/SimpleDesk.english.php
translation: /sd_language/SimpleDesk.%language%.php
- source: sd_language/SimpleDeskAdmin.english.php
translation: /sd_language/SimpleDeskAdmin.%language%.php
- source: sd_language/SimpleDeskLogAction.english.php
translation: /sd_language/SimpleDeskLogAction.%language%.php
- source: sd_language/SimpleDeskNotifications.english.php
translation: /sd_language/SimpleDeskNotifications.%language%.php
- source: sd_language/SimpleDeskPermissions.english.php
translation: /sd_language/SimpleDeskPermissions.%language%.php
- source: sd_language/SimpleDeskProfile.english.php
translation: /sd_language/SimpleDeskProfile.%language%.php
- source: sd_language/SimpleDeskWho.english.php
translation: /sd_language/SimpleDeskWho.%language%.php
- source: language-readme/readme.english.txt
translation: /language-readme/readme.%language%.txt
- source: sd_plugins_lang/SDPluginFrontPage.english.php
translation: /sd_plugins_lang/SDPluginFrontPage.%language%.php
- source: sd_plugins_lang/SDPluginStats.english.php
translation: /sd_plugins_lang/SDPluginStats.%language%.php
29 changes: 29 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Security Policy

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| 2.1.x | :white_check_mark: |
| 2.0.x | :white_check_mark: |
| 1.x | :x: |

## Reporting a Vulnerability

To report a security issue use [Security Advisories](https://github.com/SimpleMachines/SimpleDesk/security/advisories).

## The process
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.

Once validated, our team will work on patching.

Due to our small team size and because we are all volunteers, we do not have timelines we can give beyond estimates.

## Credits
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.

## Bounties
This project does not have any source of income and we do not have the funds to pay bounties.

# Thank you
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.
2 changes: 1 addition & 1 deletion css/helpdesk.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ h3.ticketheader img {

/* Ticket details (Left-floated box) */
.shd_ticket_side_column {
width: 23%;
min-width: 23%;
padding: 0;
}
.shd_ticketdetails {
Expand Down
24 changes: 20 additions & 4 deletions package-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,24 @@
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>SimpleDeskTeam:SimpleDesk</id>
<name>SimpleDesk - Integrated Helpdesk for Simple Machines Forum</name>
<version>2.1.1</version>
<version>2.1.2</version>
<type>modification</type>

<upgrade from="2.1.0" for="2.1.3-2.1.99">
<!-- (Minor Upgrade) This should just be the files we need to get to the current. -->
<upgrade from="2.1.1" for="2.1.4-2.1.99">
<require-file name="sd_source/Subs-SimpleDeskManageAttachments.php" destination="$sourcedir/sd_source" />
<require-file name="sd_source/Subs-SimpleDeskPost.php" destination="$sourcedir/sd_source" />

<require-file name="sd_template/SimpleDesk.template.php" destination="$themedir/sd_template" />
<require-file name="sd_template/SimpleDesk-Post.template.php" destination="$themedir/sd_template" />

<require-file name="css/helpdesk.css" destination="$themedir/css" />

<hook hook="integrate_repair_attachments_nomsg" function="shd_repair_attachments_nomsg" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
</upgrade>

<!-- (Large upgrade) This should always indicate the lowest package we can upgrade from and all changes to the current -->
<upgrade from="2.1.0" for="2.1.4-2.1.99">
<!-- language files -->
<require-dir name="sd_language" destination="$themes_dir/default/languages" />

Expand Down Expand Up @@ -38,7 +52,7 @@
<require-dir name="sd_plugins_lang" destination="$languagedir" />
</upgrade>

<install for="2.1.3-2.1.99">
<install for="2.1.4-2.1.99">
<!-- readme files -->
<readme lang="english" parsebbc="true" type="file">language-readme/readme.english.txt</readme>

Expand Down Expand Up @@ -95,6 +109,7 @@
<hook hook="integrate_remove_attachments" function="shd_remove_attachments" file="$sourcedir/sd_source/Subs-SimpleDeskAdmin.php" />
<hook hook="integrate_attachments_browse" function="shd_attachments_browse" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
<hook hook="integrate_attachment_remove" function="shd_attachment_remove" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
<hook hook="integrate_repair_attachments_nomsg" function="shd_repair_attachments_nomsg" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />

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

<uninstall for="2.1.3-2.1.99">
<uninstall for="2.1.4-2.1.99">
<!-- database changes, undone -->
<database>uninstall-sd-optional.php</database>
<code type="file">uninstall-sd-required.php</code>
Expand Down Expand Up @@ -160,6 +175,7 @@
<hook reverse="true" hook="integrate_remove_attachments" function="shd_remove_attachments" file="$sourcedir/sd_source/Subs-SimpleDeskAdmin.php" />
<hook reverse="true" hook="integrate_attachments_browse" function="shd_attachments_browse" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
<hook reverse="true" hook="integrate_attachment_remove" function="shd_attachment_remove" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />
<hook reverse="true" hook="integrate_repair_attachments_nomsg" function="shd_repair_attachments_nomsg" file="$sourcedir/sd_source/Subs-SimpleDeskManageAttachments.php" />

<!-- Admin Section: Packages -->
<hook reverse="true" hook="integrate_packages_sort_id" function="shd_packages_sort_id" file="$sourcedir/sd_source/Subs-SimpleDeskPackages.php" />
Expand Down
6 changes: 3 additions & 3 deletions sd_source/Subs-SimpleDeskManageAttachments.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ function shd_repair_attachments_nomsg(&$ignore_ids, $min_substep, $max_substep)
FROM {db_prefix}attachments AS a
LEFT JOIN {db_prefix}helpdesk_attachments AS hda ON (hda.id_attach = a.id_attach)
LEFT JOIN {db_prefix}helpdesk_ticket_replies AS hdtr ON (hdtr.id_msg = hda.id_msg)
WHERE a.id_attach BETWEEN {int:substep} AND {int:max_substep} + 499
WHERE a.id_attach BETWEEN {int:substep} AND {int:max_substep}
AND a.id_member = {int:no_member}
AND a.id_msg != {int:no_msg}
AND a.id_msg = {int:no_msg}
AND hdtr.id_msg IS NOT NULL',
array(
'no_member' => 0,
'no_msg' => 0,
'substep' => $min_substep,
'max_substep' => $min_substep >= $max_substep ? $min_substep + 499 : $max_substep,
'max_substep' => $min_substep >= $max_substep ? $min_substep + 500 : $max_substep,
'ignore_ids' => $ignore_ids,
)
);
Expand Down
6 changes: 4 additions & 2 deletions sd_source/Subs-SimpleDeskPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ function shd_get_postable_depts()
/**
* Set a ticket to on hold or restore to the proper status.
*
* @param bool $on_hold (default true) Whether this ticket should be on hold or not.
* @param bool $on_hold (default false) Whether this ticket should be on hold or not.
* @param array &$ticketOptions - a hash array by reference, stating one or more details necessary to change on a ticket:
* <ul>
* <li>id: Required in all cases, numeric ticket id that the edit relates to</li>
Expand All @@ -995,10 +995,12 @@ function shd_get_postable_depts()
* @return bool True on success, false on failure.
* @since 2.1
*/
function shd_ticket_on_hold($on_hold = false, &$ticketOptions)
function shd_ticket_on_hold($on_hold, &$ticketOptions)
{
global $context, $smcFunc;

$on_hold = !is_bool($on_hold) ? false : $on_hold;

$current_status = !isset($context['ticket_form']['status']) ? 0 : $context['ticket_form']['status'];
$new_status = $current_status;

Expand Down
2 changes: 1 addition & 1 deletion sd_template/SimpleDesk-Post.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ function template_ticket_footer()
if (!empty($modSettings['show_modify']) && !empty($context['ticket_form']['modified']))
echo '
<div class="smalltext shd_modified">
&#171; <em>', sprintf($txt['last_edit_by'], $context['ticket']['modified']['time'], $context['ticket']['modified']['link']), '</em> &#187;
&#171; <em>', sprintf($txt['last_edit_by'], $context['ticket_form']['modified']['time'], $context['ticket_form']['modified']['link']), '</em> &#187;
</div>';

echo '
Expand Down
3 changes: 0 additions & 3 deletions sd_template/SimpleDesk.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ function template_main()
template_ticket_block();
}

echo '
</div>';

//echo 'I\'m alive!!!!!!!!!!1111oneone'; - I had to save this :P
}

Expand Down

0 comments on commit dfca745

Please sign in to comment.