From 9a8da11a8f4c80ee4bbe0c0b3b76ef8e3afbdb12 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Tue, 27 Oct 2015 13:26:13 -0400 Subject: [PATCH 01/12] #391 Add .active to customer-side nav items --- inc/header.inc.php | 32 +++++++++++++++++++++++++++----- index.php | 3 +++ knowledgebase.php | 2 ++ ticket.php | 1 + 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/inc/header.inc.php b/inc/header.inc.php index 05ce1593..deccdfda 100644 --- a/inc/header.inc.php +++ b/inc/header.inc.php @@ -147,7 +147,12 @@ if (is_dir(HESK_PATH . 'install')) { background-color: ; } - .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:focus, .navbar-default .navbar-nav > .open > a:hover { + .navbar-default .navbar-nav > .open > a, + .navbar-default .navbar-nav > .open > a:focus, + .navbar-default .navbar-nav > .open > a:hover, + .navbar-default .navbar-nav > .active > a, + .navbar-default .navbar-nav > .active > a:focus, + .navbar-default .navbar-nav > .active > a:hover { color: ; background-color: ; background-image: none; @@ -257,10 +262,22 @@ if ($modsForHesk_settings['show_icons']) { '; + echo '
'; break; /* Large text box */ @@ -825,7 +825,7 @@ function print_add_ticket()
-
'; + '; break; case 'multiselect': @@ -902,7 +902,7 @@ function print_add_ticket()
-
'; + '; break; @@ -956,7 +956,7 @@ function print_add_ticket()
-
'; + '; } } } From 967df9dbd428564fde2b074059c8d5771617c990 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 29 Oct 2015 13:28:50 -0400 Subject: [PATCH 07/12] #395 Fix custom field requirements --- index.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index bd74d58f..535f16a4 100644 --- a/index.php +++ b/index.php @@ -403,7 +403,6 @@ function print_add_ticket() $formattedId = preg_replace("/[\s_]/", "-", $formattedId); $cls = in_array($k, $_SESSION['iserror']) ? ' class="isError" ' : ''; - echo '
+ value="' . $v['value'] . '" '.$errorText. ' '.$required.' readonly> ' . $hesklang['date_format'] . '
'; @@ -706,6 +706,7 @@ function print_add_ticket() $v['name'] = $hesklang[$v['name']]; } + $required = $v['req'] ? 'required' : ''; $v['req'] = $v['req'] ? '*' : ''; if ($v['type'] == 'checkbox' || $v['type'] == 'multiselect') { @@ -857,10 +858,13 @@ function print_add_ticket()
-
'; + + + '; break; case 'date': + $errorText = $required == 'required' ? 'data-error="'.htmlspecialchars($hesklang['this_field_is_required']).'"' : ''; //Clean up multiple dashes or whitespaces $formattedId = preg_replace("/[\s-]+/", " ", $v['name']); $formattedId = preg_replace("/[\s_]/", "-", $formattedId); @@ -876,8 +880,9 @@ function print_add_ticket()
+ value="' . $v['value'] . '" '.$errorText. ' readonly="readonly" '.$required.'> ' . $hesklang['date_format'] . ' +
'; break; From b58bc19286dee61d2eee4e29e6b32bb63f17376c Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 29 Oct 2015 13:35:05 -0400 Subject: [PATCH 08/12] Validate anti-spam question --- index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 535f16a4..15af7ffd 100644 --- a/index.php +++ b/index.php @@ -1009,7 +1009,12 @@ function print_add_ticket() $value = stripslashes(hesk_input($_SESSION['c_question'])); } $cls = in_array('question', $_SESSION['iserror']) ? ' class="isError" ' : ''; - echo '
' . $hesk_settings['question_ask'] . '
'; + echo '
' . $hesk_settings['question_ask'] . '
+ +
+
'; ?> Date: Thu, 29 Oct 2015 14:08:35 -0400 Subject: [PATCH 09/12] Fix header warning --- inc/header.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/header.inc.php b/inc/header.inc.php index deccdfda..70f19ccb 100644 --- a/inc/header.inc.php +++ b/inc/header.inc.php @@ -41,6 +41,7 @@ if (!function_exists('mfh_getSettings')) { $modsForHesk_settings = array(); if (is_dir(HESK_PATH . 'install')) { + $modsForHesk_settings['navbar_title_url'] = '#'; $modsForHesk_settings['rtl'] = 0; $modsForHesk_settings['use_bootstrap_theme'] = 1; $modsForHesk_settings['show_icons'] = 1; From 2f301a1cb38d54ad36df04270638593645a01eb2 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 29 Oct 2015 14:18:05 -0400 Subject: [PATCH 10/12] #398 Parse date custom fields --- admin/export.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/admin/export.php b/admin/export.php index b73771fe..40745fe7 100644 --- a/admin/export.php +++ b/admin/export.php @@ -502,7 +502,12 @@ if (isset($_GET['w'])) { // Add custom fields foreach ($hesk_settings['custom_fields'] as $k => $v) { if ($v['use']) { - $tmp .= ' ' . "\n"; + $output = $ticket[$k]; + if ($v['type'] == 'date' && !empty($ticket[$k])) { + $dt = date('Y-m-d', $ticket[$k]); + $output = hesk_dateToString($dt, 0); + } + $tmp .= ' ' . "\n"; } } From 68cb0114dc00872e172e50a119d8f75fc9c04d87 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 29 Oct 2015 21:49:13 -0400 Subject: [PATCH 11/12] Update installer --- inc/header.inc.php | 2 +- inc/headerAdmin.inc.php | 2 +- install/install_functions.inc.php | 2 +- .../ajax/install-database-ajax.php | 2 + install/mods-for-hesk/installModsForHesk.php | 3 ++ install/mods-for-hesk/js/version-scripts.js | 3 ++ install/mods-for-hesk/modsForHesk.php | 52 ++++++++++++------- install/mods-for-hesk/sql/installSql.php | 9 ++++ 8 files changed, 52 insertions(+), 23 deletions(-) diff --git a/inc/header.inc.php b/inc/header.inc.php index 70f19ccb..4d6b7933 100644 --- a/inc/header.inc.php +++ b/inc/header.inc.php @@ -29,7 +29,7 @@ *******************************************************************************/ // Define the current build -define('MODS_FOR_HESK_BUILD', 22); +define('MODS_FOR_HESK_BUILD', 23); /* Check if this is a valid include */ if (!defined('IN_SCRIPT')) { diff --git a/inc/headerAdmin.inc.php b/inc/headerAdmin.inc.php index a7934231..f1504330 100644 --- a/inc/headerAdmin.inc.php +++ b/inc/headerAdmin.inc.php @@ -29,7 +29,7 @@ *******************************************************************************/ // Define the current build -define('MODS_FOR_HESK_BUILD', 22); +define('MODS_FOR_HESK_BUILD', 23); /* Check if this is a valid include */ if (!defined('IN_SCRIPT')) { diff --git a/install/install_functions.inc.php b/install/install_functions.inc.php index e004a955..3edade87 100644 --- a/install/install_functions.inc.php +++ b/install/install_functions.inc.php @@ -37,7 +37,7 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');} // We will be installing this HESK version: define('HESK_NEW_VERSION','2.6.5'); -define('MODS_FOR_HESK_NEW_VERSION','2.5.1'); +define('MODS_FOR_HESK_NEW_VERSION','2.5.2'); define('REQUIRE_PHP_VERSION','5.0.0'); define('REQUIRE_MYSQL_VERSION','5.0.7'); diff --git a/install/mods-for-hesk/ajax/install-database-ajax.php b/install/mods-for-hesk/ajax/install-database-ajax.php index 6068f4f0..b520f934 100644 --- a/install/mods-for-hesk/ajax/install-database-ajax.php +++ b/install/mods-for-hesk/ajax/install-database-ajax.php @@ -50,6 +50,8 @@ if ($version == 2) { execute250Scripts(); } elseif ($version == 22) { execute251Scripts(); +} elseif ($version == 23) { + execute252Scripts(); } else { $response = 'The version "' . $version . '" was not recognized. Check the value submitted and try again.'; print $response; diff --git a/install/mods-for-hesk/installModsForHesk.php b/install/mods-for-hesk/installModsForHesk.php index 9473fd4c..6e293bca 100644 --- a/install/mods-for-hesk/installModsForHesk.php +++ b/install/mods-for-hesk/installModsForHesk.php @@ -74,6 +74,9 @@ function echoInitialVersionRows($version) if ($version < 22) { printRow('2.5.1'); } + if ($version < 23) { + printRow('2.5.2'); + } } function printRow($version) diff --git a/install/mods-for-hesk/js/version-scripts.js b/install/mods-for-hesk/js/version-scripts.js index 6a1c9695..424ef110 100644 --- a/install/mods-for-hesk/js/version-scripts.js +++ b/install/mods-for-hesk/js/version-scripts.js @@ -62,6 +62,9 @@ function processUpdates(startingVersion) { } else if (startingVersion < 22) { startVersionUpgrade('251'); executeUpdate(22, '251', '2.5.1'); + } else if (startingVersion < 23) { + startVersionUpgrade('252'); + executeUpdate(23, '252', '2.5.2'); } else { installationFinished(); } diff --git a/install/mods-for-hesk/modsForHesk.php b/install/mods-for-hesk/modsForHesk.php index 56f26db5..712de220 100644 --- a/install/mods-for-hesk/modsForHesk.php +++ b/install/mods-for-hesk/modsForHesk.php @@ -130,6 +130,18 @@ hesk_dbConnect(); } ?>
+
+ + 2.5.1 +
btn-block disablable" href="installModsForHesk.php?v=19">2.4.1
+
+
+ +
btn-block disablable" href="installModsForHesk.php?v=18">2.4.0
-
-
- -
btn-block disablable" href="installModsForHesk.php?v=15">2.3.0
+
+
+ +
btn-block disablable" href="installModsForHesk.php?v=14">2.2.1
-
-
- -
btn-block disablable" href="installModsForHesk.php?v=11">2.1.0
+
+
+ +
btn-block disablable" href="installModsForHesk.php?v=10">2.0.1
-
-
- -
btn-block disablable" href="installModsForHesk.php?v=7">1.6.1
+
+
+ +
btn-block disablable" href="installModsForHesk.php?v=6">1.6.0
-
-
- -
1.5.0 @@ -351,14 +363,14 @@ hesk_dbConnect(); 1.4.0
-
- 1.3.0 -

+
+ 1.3.0 +
1.2.4 diff --git a/install/mods-for-hesk/sql/installSql.php b/install/mods-for-hesk/sql/installSql.php index 001e6534..57162b37 100644 --- a/install/mods-for-hesk/sql/installSql.php +++ b/install/mods-for-hesk/sql/installSql.php @@ -684,4 +684,13 @@ function execute251Scripts() hesk_dbConnect(); executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.1' WHERE `Key` = 'modsForHeskVersion'"); +} + +// Version 2.5.2 +function execute252Scripts() +{ + global $hesk_settings; + hesk_dbConnect(); + + executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.2' WHERE `Key` = 'modsForHeskVersion'"); } \ No newline at end of file From 726ec1f8d635c4bbfc595f5221b0c3ce5c24491d Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 29 Oct 2015 23:11:08 -0400 Subject: [PATCH 12/12] Change version number --- language/en/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/en/text.php b/language/en/text.php index 8d8ad803..62ac627a 100644 --- a/language/en/text.php +++ b/language/en/text.php @@ -21,7 +21,7 @@ $hesklang['_COLLATE']='utf8_unicode_ci'; // This is the email break line that will be used in email piping $hesklang['EMAIL_HR']='------ Reply above this line ------'; -// ADDED OR MODIFIED IN Mods for HESK 2.6.0 +// ADDED OR MODIFIED IN Mods for HESK 2.5.2 $hesklang['manage_statuses'] = 'Manage Statuses'; $hesklang['manage_service_messages'] = 'Manage Service Messages'; $hesklang['manage_banned_ips'] = 'Manage Banned IPs';