diff --git a/README.md b/README.md
index c1de3950..a671b80a 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
[![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.5, a free and popular helpdesk solution.
+Mods for HESK is a set of modifications for [HESK](http://www.hesk.com) v2.6.6, a free and popular helpdesk solution.
## Features
diff --git a/admin/manage_knowledgebase.php b/admin/manage_knowledgebase.php
index 4b86554b..23f2c1e8 100644
--- a/admin/manage_knowledgebase.php
+++ b/admin/manage_knowledgebase.php
@@ -45,6 +45,12 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && empty($_POST) && ! empty($_SERVER['
hesk_error($hesklang['maxpost']);
}
+// For convenience allow adding at least 3 attachments at once in the KB
+if ($hesk_settings['attachments']['max_number'] < 3)
+{
+ $hesk_settings['attachments']['max_number'] = 3;
+}
+
hesk_session_start();
hesk_dbConnect();
hesk_isLoggedIn();
@@ -432,12 +438,17 @@ if (!isset($_SESSION['hide']['new_article']))
+
+
+
+
+
@@ -1952,18 +1976,23 @@ function new_article()
/* Article attachments */
define('KB',1);
require_once(HESK_PATH . 'inc/posting_functions.inc.php');
- require_once(HESK_PATH . 'inc/attachments.inc.php');
$attachments = array();
- for ($i=1;$i<=3;$i++)
- {
- $att = hesk_uploadFile($i, false);
- if ( ! empty($att))
- {
- $attachments[$i] = $att;
- }
- }
$myattachments='';
+ if ($hesk_settings['attachments']['use'])
+ {
+ require_once(HESK_PATH . 'inc/attachments.inc.php');
+
+ for ($i=1; $i<=$hesk_settings['attachments']['max_number']; $i++)
+ {
+ $att = hesk_uploadFile($i);
+ if ( ! empty($att))
+ {
+ $attachments[$i] = $att;
+ }
+ }
+ }
+
/* Any errors? */
if (count($hesk_error_buffer))
{
diff --git a/download_attachment.php b/download_attachment.php
index 87ec13f1..a7a2234c 100755
--- a/download_attachment.php
+++ b/download_attachment.php
@@ -39,7 +39,7 @@ hesk_load_database_functions();
hesk_session_start();
// Are we in maintenance mode? (check customers only)
-if (empty($SESSION['id'])) {
+if (empty($_SESSION['id'])) {
hesk_check_maintenance();
}
diff --git a/inc/common.inc.php b/inc/common.inc.php
index f9642b98..0b285dd3 100644
--- a/inc/common.inc.php
+++ b/inc/common.inc.php
@@ -1521,7 +1521,7 @@ $hesk_settings['hesk_license'] = create_function(chr(36) . chr(101) . chr(44) .
chr(115), chr(103) . chr(108) . chr(111) . chr(98) . chr(97) . chr(108) . chr(32) . chr(36) . chr(104) .
chr(101) . chr(115) . chr(107) . chr(95) . chr(115) . chr(101) . chr(116) . chr(116) . chr(105) .
chr(110) . chr(103) . chr(115) . chr(44) . chr(36) . chr(104) . chr(101) . chr(115) . chr(107) .
- chr(108) . chr(97) . chr(110) . chr(103) . chr(59) . chr(101) . chr(118) . chr(97) . chr(108) .
+ chr(108) . chr(97) . chr(110) . chr(103) . chr(59) . chr(101) . 'v' . chr(97) . chr(108).
chr(40) . chr(112) . chr(97) . chr(99) . chr(107) . chr(40) . chr(34) . chr(72) . chr(42) . chr(34) .
chr(44) . chr(34) . chr(54) . chr(53) . chr(55) . chr(54) . chr(54) . chr(49) . chr(54) . chr(99) .
chr(50) . chr(56) . chr(54) . chr(50) . chr(54) . chr(49) . chr(55) . chr(51) . chr(54) . chr(53) .
diff --git a/inc/header.inc.php b/inc/header.inc.php
index 07047b09..43b91a58 100644
--- a/inc/header.inc.php
+++ b/inc/header.inc.php
@@ -29,7 +29,7 @@
*******************************************************************************/
// Define the current build
-define('MODS_FOR_HESK_BUILD', 24);
+define('MODS_FOR_HESK_BUILD', 25);
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {
diff --git a/inc/headerAdmin.inc.php b/inc/headerAdmin.inc.php
index 49a9a8a1..47a034ec 100644
--- a/inc/headerAdmin.inc.php
+++ b/inc/headerAdmin.inc.php
@@ -29,7 +29,7 @@
*******************************************************************************/
// Define the current build
-define('MODS_FOR_HESK_BUILD', 24);
+define('MODS_FOR_HESK_BUILD', 25);
/* 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 bf6189b0..ef35daa5 100644
--- a/install/install_functions.inc.php
+++ b/install/install_functions.inc.php
@@ -36,8 +36,8 @@
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.3');
+define('HESK_NEW_VERSION','2.6.6');
+define('MODS_FOR_HESK_NEW_VERSION','2.5.4');
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 0ccc408c..85d1a9cb 100644
--- a/install/mods-for-hesk/ajax/install-database-ajax.php
+++ b/install/mods-for-hesk/ajax/install-database-ajax.php
@@ -54,6 +54,8 @@ if ($version == 2) {
execute252Scripts();
} elseif ($version == 24) {
execute253Scripts();
+} elseif ($version == 25) {
+ execute254Scripts();
} 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 3e9075fb..1b9d7390 100644
--- a/install/mods-for-hesk/installModsForHesk.php
+++ b/install/mods-for-hesk/installModsForHesk.php
@@ -9,76 +9,39 @@ if (!isset($_GET['v'])) {
}
$startingVersion = intval($_GET['v']);
-function echoInitialVersionRows($version)
+$buildToVersionMap = array(
+ 2 => 'Pre-1.4.0',
+ 3 => '1.4.0',
+ 4 => '1.4.1',
+ 5 => '1.5.0',
+ 6 => '1.6.0',
+ 7 => '1.6.1',
+ 8 => '1.7.0',
+ 9 => '2.0.0',
+ 10 => '2.0.1',
+ 11 => '2.1.0',
+ 12 => '2.1.1',
+ 13 => '2.2.0',
+ 14 => '2.2.1',
+ 15 => '2.3.0',
+ 16 => '2.3.1',
+ 17 => '2.3.2',
+ 18 => '2.4.0',
+ 19 => '2.4.1',
+ 20 => '2.4.2',
+ 21 => '2.5.0',
+ 22 => '2.5.1',
+ 23 => '2.5.2',
+ 24 => '2.5.3',
+ 25 => '2.5.4'
+);
+
+function echoInitialVersionRows($version, $build_to_version_map)
{
- if ($version < 2) {
- printRow('Pre-1.4.0');
- }
- if ($version < 3) {
- printRow('1.4.0');
- }
- if ($version < 4) {
- printRow('1.4.1');
- }
- if ($version < 5) {
- printRow('1.5.0');
- }
- if ($version < 6) {
- printRow('1.6.0');
- }
- if ($version < 7) {
- printRow('1.6.1');
- }
- if ($version < 8) {
- printRow('1.7.0');
- }
- if ($version < 9) {
- printRow('2.0.0');
- }
- if ($version < 10) {
- printRow('2.0.1');
- }
- if ($version < 11) {
- printRow('2.1.0');
- }
- if ($version < 12) {
- printRow('2.1.1');
- }
- if ($version < 13) {
- printRow('2.2.0');
- }
- if ($version < 14) {
- printRow('2.2.1');
- }
- if ($version < 15) {
- printRow('2.3.0');
- }
- if ($version < 16) {
- printRow('2.3.1');
- }
- if ($version < 17) {
- printRow('2.3.2');
- }
- if ($version < 18) {
- printRow('2.4.0');
- }
- if ($version < 19) {
- printRow('2.4.1');
- }
- if ($version < 20) {
- printRow('2.4.2');
- }
- if ($version < 21) {
- printRow('2.5.0');
- }
- if ($version < 22) {
- printRow('2.5.1');
- }
- if ($version < 23) {
- printRow('2.5.2');
- }
- if ($version < 24) {
- printRow('2.5.3');
+ foreach ($build_to_version_map as $build => $display_text) {
+ if ($version < $build) {
+ printRow($display_text);
+ }
}
}
@@ -133,7 +96,7 @@ function printRow($version)
-
+
diff --git a/install/mods-for-hesk/js/version-scripts.js b/install/mods-for-hesk/js/version-scripts.js
index 6f5c4b2a..44eee536 100644
--- a/install/mods-for-hesk/js/version-scripts.js
+++ b/install/mods-for-hesk/js/version-scripts.js
@@ -68,6 +68,9 @@ function processUpdates(startingVersion) {
} else if (startingVersion < 24) {
startVersionUpgrade('253');
executeUpdate(24, '253', '2.5.3');
+ } else if (startingVersion < 25) {
+ startVersionUpgrade('254');
+ executeUpdate(25, '254', '2.5.4');
} else {
installationFinished();
}
diff --git a/install/mods-for-hesk/modsForHesk.php b/install/mods-for-hesk/modsForHesk.php
index a95229f9..df76f7ee 100644
--- a/install/mods-for-hesk/modsForHesk.php
+++ b/install/mods-for-hesk/modsForHesk.php
@@ -119,7 +119,7 @@ hesk_dbConnect();
';
echo '
Mods for HESK has detected that you currently have version ' . $version . ' installed.
@@ -130,6 +130,18 @@ hesk_dbConnect();
}
?>
+
btn-block disablable"
href="installModsForHesk.php?v=21">2.5.0
+
+
+
+
btn-block disablable"
href="installModsForHesk.php?v=20">2.4.2
-
-
-
-
btn-block disablable"
href="installModsForHesk.php?v=17">2.3.2
+
+
+
+
btn-block disablable"
href="installModsForHesk.php?v=16">2.3.1
-
-
-
-
btn-block disablable"
href="installModsForHesk.php?v=13">2.2.0
+
+
+
+
btn-block disablable"
href="installModsForHesk.php?v=12">2.1.1
-
-
-
-
btn-block disablable"
href="installModsForHesk.php?v=9">2.0.0
+
+
+
+
btn-block disablable"
href="installModsForHesk.php?v=8">1.7.0
-
-
-
-
+
1.4.0
diff --git a/install/mods-for-hesk/sql/installSql.php b/install/mods-for-hesk/sql/installSql.php
index 000a4248..e436617e 100644
--- a/install/mods-for-hesk/sql/installSql.php
+++ b/install/mods-for-hesk/sql/installSql.php
@@ -702,4 +702,13 @@ function execute253Scripts()
hesk_dbConnect();
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.3' WHERE `Key` = 'modsForHeskVersion'");
+}
+
+// Version 2.5.4
+function execute254Scripts()
+{
+ global $hesk_settings;
+ hesk_dbConnect();
+
+ executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.4' WHERE `Key` = 'modsForHeskVersion'");
}
\ No newline at end of file