diff --git a/admin/admin_main.php b/admin/admin_main.php index ea556516..51711d66 100644 --- a/admin/admin_main.php +++ b/admin/admin_main.php @@ -1,7 +1,7 @@


+
-
-
- +
'; + } + ?>
+
@@ -1127,18 +1138,23 @@ function save_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)) { @@ -1447,10 +1463,11 @@ function edit_article()


+
'; } + + // New attachments + if ($hesk_settings['attachments']['use']) + { + for ($i=1;$i<=$hesk_settings['attachments']['max_number'];$i++) + { + echo '
'; + } + } ?> - -
-
- - +
+ +
@@ -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/admin/manage_permission_templates.php b/admin/manage_permission_templates.php index a6950ad0..bbdd2fc7 100644 --- a/admin/manage_permission_templates.php +++ b/admin/manage_permission_templates.php @@ -1,7 +1,7 @@ '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..24c90bcc 100644 --- a/install/mods-for-hesk/modsForHesk.php +++ b/install/mods-for-hesk/modsForHesk.php @@ -119,7 +119,7 @@ hesk_dbConnect();

What version of Mods for HESK do you currently have installed?


'; echo '
'; echo '

Mods for HESK has detected that you currently have version ' . $version . ' installed. @@ -130,6 +130,18 @@ hesk_dbConnect(); } ?>

+
+ + 2.5.3 +
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.5.0
-
- 1.4.1 -

+
+ 1.4.1 +
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 diff --git a/knowledgebase.php b/knowledgebase.php index a2741297..0b735d1c 100644 --- a/knowledgebase.php +++ b/knowledgebase.php @@ -1,7 +1,7 @@