diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e174429b..826743d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,15 +2,15 @@ So you want to contribute to Mods for HESK? Awesome! However, there are a few guidelines that need to be followed so the project can be as easy to maintain as possible. ## Submitting an issue -If all you are doing is submitting an issue, please check if your "issue" qualifies as a GitHub issue: - - **Feature Requests:** Feature requests are now being recorded at the Mods for HESK [UserVoice page](https://mods-for-hesk.uservoice.com/forums/254758-general). Please do not open these types of issues on GitHub. Issues opened that are "feature requests" will be closed. - - **Translations:** Translations are now being recorded at the official Mods for HESK [website](https://mods-for-hesk.mkochcs.com/download.php). Please do not open these types of issues on GitHub. Issues opened that pertain to submitting new translations will be closed. +If all you are doing is submitting an issue, please check if your "issue" qualifies as a GitLab issue: + - **Feature Requests:** Feature requests are now being recorded at the Mods for HESK [UserVoice page](https://mods-for-hesk.uservoice.com/forums/254758-general). Please do not open these types of issues on GitLab. Issues opened that are "feature requests" will be closed. + - **Translations:** Translations are now being recorded at the official Mods for HESK [website](https://mods-for-hesk.mkochcs.com/download.php). Please do not open these types of issues on GitLab. Issues opened that pertain to submitting new translations will be closed. - **Bugs:** Yes, please open these types of issues here. :grinning: ## Getting Started -If you have already completed any of these steps in the past (such as creating a GitHub account), you can skip the respective step. - - Make sure you have a [GitHub account](http://github.com/signup/free) - - Fork the repository on GitHub (for more help consult the [GitHub documentation](https://help.github.com/articles/fork-a-repo/)) +If you have already completed any of these steps in the past (such as creating a GitLab account), you can skip the respective step. + - Make sure you have a [GitLab account](https://gitlab.com/users/sign_in) + - Fork the repository on GitLab ## Making Changes - Create a feature branch from where to base your work off of @@ -22,7 +22,6 @@ If you have already completed any of these steps in the past (such as creating a ## Submitting Changes - Push your changes to a topic branch in your fork of the repository - - Submit a pull request to the official Mods for HESK repository (mkoch227/Mods-for-HESK) - - If necessary, sign the Contributor License Agreement by checking the "status checks" area of your pull request. - - The owner of Mods for HESK will then inspect and test the code in the pull request. Feedback will be given via GitHub comments. + - Submit a pull request to the official Mods for HESK repository (mike-koch/Mods-for-HESK) + - The owner of Mods for HESK will then inspect and test the code in the pull request. Feedback will be given via GitLab comments. - The owner of Mods for HESK expects responses within two weeks of the original comment. If there is no feedback within that time range, the pull request will be considered abandoned and subsequently will be closed. diff --git a/admin/admin_reply_ticket.php b/admin/admin_reply_ticket.php index 81e485f1..96ab9f9f 100644 --- a/admin/admin_reply_ticket.php +++ b/admin/admin_reply_ticket.php @@ -234,7 +234,7 @@ if ($ticket['locked']) { if ($ticket['status'] != $new_status) { // Does this status close the ticket? - $newStatusRs = hesk_dbQuery('SELECT `IsClosed`, `Key` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses` WHERE `ID` = ' . hesk_dbEscape($new_status)); + $newStatusRs = hesk_dbQuery('SELECT `IsClosed`, `Key` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses` WHERE `ID` = ' . intval($new_status)); $newStatus = hesk_dbFetchAssoc($newStatusRs); if ($newStatus['IsClosed'] && hesk_checkPermission('can_resolve', 0)) { diff --git a/admin/admin_ticket.php b/admin/admin_ticket.php index 58014f08..71100f3e 100644 --- a/admin/admin_ticket.php +++ b/admin/admin_ticket.php @@ -470,12 +470,12 @@ if (($can_reply || $can_edit) && isset($_POST['childTrackingId'])) { } //-- Check if the ticket is already a child. - $childRs = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` WHERE `parent` = ' . $ticket['id'] . ' AND `trackid` = \'' . $_POST['childTrackingId'] . '\''); + $childRs = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` WHERE `parent` = ' . intval($ticket['id']) . ' AND `trackid` = \'' . hesk_dbEscape(hesk_POST(['childTrackingId'])) . '\''); if (hesk_dbNumRows($childRs) > 0) { hesk_process_messages(sprintf($hesklang['is_already_linked'], $_POST['childTrackingId']), 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999), 'NOTICE'); } - hesk_dbQuery('UPDATE `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` SET `parent` = ' . $ticket['id'] . ' WHERE `trackid` = \'' . $_POST['childTrackingId'] . '\''); + hesk_dbQuery('UPDATE `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` SET `parent` = ' . intval($ticket['id']) . ' WHERE `trackid` = \'' . hesk_dbEscape(hesk_POST('childTrackingId')) . '\''); hesk_process_messages(sprintf($hesklang['link_added'], $_POST['childTrackingId']), 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999), 'SUCCESS'); } @@ -746,7 +746,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); if ($ticket['parent'] != null) { //-- Get the tracking ID of the parent $parentRs = hesk_dbQuery('SELECT `trackid` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` - WHERE `ID` = ' . hesk_dbEscape($ticket['parent'])); + WHERE `ID` = ' . intval($ticket['parent'])); $parent = hesk_dbFetchAssoc($parentRs); echo ' '; @@ -755,7 +755,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); //-- Check if any tickets have a parent set to this tracking ID $hasRows = false; $childrenRS = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` - WHERE `parent` = ' . hesk_dbEscape($ticket['id'])); + WHERE `parent` = ' . intval($ticket['id'])); while ($row = hesk_dbFetchAssoc($childrenRS)) { $hasRows = true; echo ' @@ -916,7 +916,24 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); ?>
- + + +
@@ -1014,13 +1031,14 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); { echo ''; } - echo '
'; + echo ''; } else { echo '

'; echo isset($admins[$ticket['owner']]) ? $admins[$ticket['owner']] : ($can_assign_self ? $hesklang['unas'] . ' [' . $hesklang['asss'] . ']' : $hesklang['unas']); echo '

'; } + echo ''; echo '

' . $hesklang['category'] . '

'; if (strlen($categories_options) && ($can_change_cat || $can_change_own_cat)) { echo ' @@ -1280,7 +1298,7 @@ function hesk_getAdminButtons($category_id) } } - $isTicketClosedSql = 'SELECT `IsClosed`, `Closable` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses` WHERE `ID` = ' . $ticket['status']; + $isTicketClosedSql = 'SELECT `IsClosed`, `Closable` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses` WHERE `ID` = ' . intval($ticket['status']); $isTicketClosedRs = hesk_dbQuery($isTicketClosedSql); $isTicketClosedRow = hesk_dbFetchAssoc($isTicketClosedRs); $isTicketClosed = $isTicketClosedRow['IsClosed']; @@ -1297,15 +1315,22 @@ function hesk_getAdminButtons($category_id) } $dropdown = ' -
- -
'; + $dropdown .= '
'; $options .= $dropdown; /* Return generated HTML */ @@ -1609,15 +1644,22 @@ function mfh_print_message() { ?>
- +
+
+ +
+
+ +
+

- +
+
+ +
+
+ +
+
- - '; + return ' + + + + + + + + + + + + + + + + + + + +
' . $hesklang['operating_system'] . ' +  
' . $hesklang['browser'] . ' 
' . $hesklang['screen_resolution'] . ' +  
'; } ?> diff --git a/admin/assign_owner.php b/admin/assign_owner.php index 92d2f7c2..64a6426d 100755 --- a/admin/assign_owner.php +++ b/admin/assign_owner.php @@ -92,8 +92,9 @@ if (!$row['isadmin']) { // Make sure two people don't assign a ticket to a different user at the same time if ($ticket['owner'] && $ticket['owner'] != $owner && hesk_REQUEST('unassigned') && hesk_GET('confirm') != 'Y') { $new_owner = ($owner == $_SESSION['id']) ? $hesklang['scoy'] : sprintf($hesklang['scot'], $row['name']); + $originalOwner = intval($ticket['owner']); - $res = hesk_dbQuery("SELECT `name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `id`='{$ticket['owner']}' LIMIT 1"); + $res = hesk_dbQuery("SELECT `name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `id`='{$originalOwner}' LIMIT 1"); if (hesk_dbNumRows($res) == 1) { $row = hesk_dbFetchAssoc($res); diff --git a/admin/calendar.php b/admin/calendar.php index 96c98361..b2fbef33 100644 --- a/admin/calendar.php +++ b/admin/calendar.php @@ -68,7 +68,7 @@ while ($row = hesk_dbFetchAssoc($rs)) { continue; } - $row['css_style'] = $row['color'] == null ? 'color: black; border: solid 1px #000;' : 'border: solid 1px ' . $row['color'] . '; background: ' . $row['color']; + $row['css_style'] = $row['color'] == null ? 'background: white; color: black; border: solid 1px #000;' : 'border: solid 1px ' . $row['color'] . '; background: ' . $row['color']; $categories[] = $row; } @@ -83,7 +83,6 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');