diff --git a/README.md b/README.md index fd837659..fc68f220 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -## [Mods for HESK](http://mods-for-hesk.mkochcs.com) [![Current Release](https://img.shields.io/github/release/mkoch227/Mods-for-HESK.svg)](https://www.github.com/mkoch227/Mods-for-HESK/releases) [![Project Status](http://stillmaintained.com/mkoch227/Mods-for-HESK.png)](https://www.github.com/mkoch227/Mods-for-HESK) +## [Mods for HESK](http://mods-for-hesk.mkochcs.com) [![Number of Downloads](https://img.shields.io/github/downloads/mkoch227/Mods-for-HESK/latest/total.svg)](https://www.github.com/mkoch227/Mods-for-HESK/releases) [![Open Issues](https://img.shields.io/github/issues-raw/mkoch227/Mods-for-HESK.svg)](https://www.github.com/mkoch227/Mods-for-HESK/issues) [![Current Release](https://img.shields.io/github/release/mkoch227/Mods-for-HESK.svg)](https://www.github.com/mkoch227/Mods-for-HESK/releases) [![Project Status](http://stillmaintained.com/mkoch227/Mods-for-HESK.png)](https://www.github.com/mkoch227/Mods-for-HESK) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mkoch227/Mods-for-HESK/blob/master/LICENSE) [![Join the chat at https://gitter.im/mkoch227/Mods-for-HESK](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mkoch227/Mods-for-HESK?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -Mods for HESK is a set of modifications for [HESK](http://www.hesk.com) v2.6.4, a free and popular helpdesk solution. +Mods for HESK is a set of modifications for [HESK](http://www.hesk.com) v2.6.5, a free and popular helpdesk solution. ## Features diff --git a/admin/admin_main.php b/admin/admin_main.php index 29baa6f8..d80ecf5a 100644 --- a/admin/admin_main.php +++ b/admin/admin_main.php @@ -1,7 +1,7 @@ Helpdesk settings */ $set['hesk_title'] = hesk_input( hesk_POST('s_hesk_title'), $hesklang['err_htitle']); $set['hesk_title'] = str_replace('\\"','"',$set['hesk_title']); -$set['hesk_url'] = hesk_input( hesk_POST('s_hesk_url'), $hesklang['err_hurl']); +$set['hesk_url'] = rtrim( hesk_input( hesk_POST('s_hesk_url'), $hesklang['err_hurl']), '/'); // ---> check admin folder $set['admin_dir'] = isset($_POST['s_admin_dir']) && ! is_array($_POST['s_admin_dir']) ? preg_replace('/[^a-zA-Z0-9_-]/', '', $_POST['s_admin_dir']) : 'admin'; @@ -488,6 +494,19 @@ for ($i=1;$i<=20;$i++) { $set['custom_fields'][$this_field]['type'] = 'text'; } + + // Try to detect if field type changed to anything except "select" + if ($set['custom_fields'][$this_field]['type'] != 'select') + { + // If type is "radio" or "checkbox" remove "please select", keep other options + $set['custom_fields'][$this_field]['value'] = str_replace('{HESK_SELECT}', '', $set['custom_fields'][$this_field]['value']); + + // Field type changed to "text" or "textarea", clear default value if it contains "#HESK#" separator + if ( in_array($set['custom_fields'][$this_field]['type'], array('text','textarea')) && ! in_array($hesk_settings['custom_fields'][$this_field]['type'], array('text','textarea')) && strpos($set['custom_fields'][$this_field]['value'], '#HESK#') !== false ) + { + $set['custom_fields'][$this_field]['value'] = ''; + } + } } else { diff --git a/admin/admin_submit_ticket.php b/admin/admin_submit_ticket.php index 0e844100..f73a3496 100644 --- a/admin/admin_submit_ticket.php +++ b/admin/admin_submit_ticket.php @@ -1,7 +1,7 @@ ' . $mysaved[1]. "\n"; if ($modsForHesk_settings['rich_text_for_tickets']) { - echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", hesk_html_entity_decode($mysaved[2]))."';\n"; + $theMessage = hesk_html_entity_decode($mysaved[2]); + $theMessage = addslashes($theMessage); + echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", $theMessage)."';\n"; } else { echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", addslashes($mysaved[2]))."';\n"; } diff --git a/admin/banned_emails.php b/admin/banned_emails.php index b9517c0f..a5f3c9a4 100644 --- a/admin/banned_emails.php +++ b/admin/banned_emails.php @@ -1,7 +1,7 @@ '.$mysaved['title'].''; if ($modsForHesk_settings['rich_text_for_tickets']) { - $javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", html_entity_decode($mysaved['message'] ))."';\n"; + $theMessage = html_entity_decode($mysaved['message']); + $theMessage = addslashes($theMessage); + $javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", $theMessage)."';\n"; } else { $javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", addslashes($mysaved['message']) )."';\n"; } diff --git a/admin/manage_users.php b/admin/manage_users.php index 1ed96f9a..a6f78c95 100644 --- a/admin/manage_users.php +++ b/admin/manage_users.php @@ -1,7 +1,7 @@ ' . $mysaved[1]. "\n"; if ($modsForHesk_settings['rich_text_for_tickets']) { - echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", hesk_html_entity_decode($mysaved[2]))."';\n"; + $theMessage = hesk_html_entity_decode($mysaved[2]); + $theMessage = addslashes($theMessage); + echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", $theMessage)."';\n"; } else { echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", addslashes($mysaved[2]))."';\n"; } diff --git a/admin/options.php b/admin/options.php index 9b2abe6b..9c4f155d 100644 --- a/admin/options.php +++ b/admin/options.php @@ -1,7 +1,7 @@
+
+ + v2.4.1 +
v2.3.1
+
+
+
v2.3.0
-
-
-
v2.1.1
+
+
+
v2.1.0
-
-
-
v1.7.0
+
+
+
v1.6.1
-
-
-
v1.4.1
-
- v1.4.0 -

+
+ v1.4.0 +
v1.3.0
diff --git a/install/mods-for-hesk/sql/installSql.php b/install/mods-for-hesk/sql/installSql.php index cb86566b..29629970 100644 --- a/install/mods-for-hesk/sql/installSql.php +++ b/install/mods-for-hesk/sql/installSql.php @@ -679,6 +679,15 @@ $modsForHesk_settings[\'rich_text_for_tickets_for_customers\'] = 0;'; } // END Version 2.4.1 +// Version 2.4.2 +function execute242Scripts() { + global $hesk_settings; + + hesk_dbConnect(); + + executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.4.2' WHERE `Key` = 'modsForHeskVersion'"); +} + // BEGIN Version 2.5.0 function migrateSettings() { global $hesk_settings; diff --git a/knowledgebase.php b/knowledgebase.php index 7fd2d310..4cbc3afd 100644 --- a/knowledgebase.php +++ b/knowledgebase.php @@ -1,7 +1,7 @@