Merge pull request #461 from mkoch227/2-5-3

2.5.3 Update
merge-requests/2/head 2.5.3
Mike Koch 8 years ago
commit 67a6819cd2

@ -2693,7 +2693,7 @@ if (defined('HESK_DEMO')) {
<div class="form-group"> <div class="form-group">
<div class="col-sm-9 col-sm-offset-3"> <div class="col-sm-9 col-sm-offset-3">
<div class="checkbox"> <div class="checkbox">
<label><input type="checkbox" name="s_notify_new" <label><input type="checkbox" name="s_notify_skip_spam"
value="1" <?php if ($hesk_settings['notify_skip_spam']) { value="1" <?php if ($hesk_settings['notify_skip_spam']) {
echo 'checked="checked"'; echo 'checked="checked"';
} ?>/> <?php echo $hesklang['enn']; ?></label> } ?>/> <?php echo $hesklang['enn']; ?></label>

@ -541,6 +541,9 @@ mfh_updateSetting('questionMarkColor', $set['questionMarkColor'], true);
mfh_updateSetting('dropdownItemTextHoverBackgroundColor', $set['dropdownItemTextHoverBackgroundColor'], true); mfh_updateSetting('dropdownItemTextHoverBackgroundColor', $set['dropdownItemTextHoverBackgroundColor'], true);
mfh_updateSetting('display_user_agent_information', $set['display_user_agent_information']); mfh_updateSetting('display_user_agent_information', $set['display_user_agent_information']);
mfh_updateSetting('navbar_title_url', $set['navbar_title_url'], true); mfh_updateSetting('navbar_title_url', $set['navbar_title_url'], true);
mfh_updateSetting('mailgun_api_key', $set['mailgun_api_key'], true);
mfh_updateSetting('mailgun_domain', $set['mailgun_domain'], true);
mfh_updateSetting('use_mailgun', $set['use_mailgun'], false);
// Prepare settings file and save it // Prepare settings file and save it
$settings_file_content = '<?php $settings_file_content = '<?php

@ -207,7 +207,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
if ($can_unban) { if ($can_unban) {
echo ' echo '
<td class="' . $color . ' text-left> <td class="' . $color . ' text-left">
<a href="banned_emails.php?a=unban&amp;id=' . $ban['id'] . '&amp;token=' . hesk_token_echo(0) . '" onclick="return confirm_delete();"> <a href="banned_emails.php?a=unban&amp;id=' . $ban['id'] . '&amp;token=' . hesk_token_echo(0) . '" onclick="return confirm_delete();">
<i class="fa fa-times red font-size-16p" data-toggle="tooltip" data-placement="top" data-original-title="' . $hesklang['delban'] . '"></i> <i class="fa fa-times red font-size-16p" data-toggle="tooltip" data-placement="top" data-original-title="' . $hesklang['delban'] . '"></i>
</a> </a>

@ -89,6 +89,7 @@ if ($statusRow['IsClosed']) // Closed
hesk_error($hesklang['ticket_not_found']); hesk_error($hesklang['ticket_not_found']);
} }
$ticket = hesk_dbFetchAssoc($result); $ticket = hesk_dbFetchAssoc($result);
$ticket['status'] = $status;
$ticket['dt'] = hesk_date($ticket['dt'], true); $ticket['dt'] = hesk_date($ticket['dt'], true);
$ticket['lastchange'] = hesk_date($ticket['lastchange'], true); $ticket['lastchange'] = hesk_date($ticket['lastchange'], true);
$ticket = hesk_ticketToPlain($ticket, 1, 0); $ticket = hesk_ticketToPlain($ticket, 1, 0);

@ -107,13 +107,16 @@ if (isset($_POST['save'])) {
$tmpvar['message'] = nl2br($tmpvar['message']); $tmpvar['message'] = nl2br($tmpvar['message']);
} }
hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "replies` SET `message`='" . hesk_dbEscape($tmpvar['message']) . "' WHERE `id`='" . intval($tmpvar['id']) . "' AND `replyto`='" . intval($ticket['id']) . "' LIMIT 1"); $tmpvar['html'] = hesk_POST('html');
hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "replies` SET `html`='" . $tmpvar['html'] . "', `message`='" . hesk_dbEscape($tmpvar['message']) . "' WHERE `id`='" . intval($tmpvar['id']) . "' AND `replyto`='" . intval($ticket['id']) . "' LIMIT 1");
} else { } else {
$tmpvar['language'] = hesk_POST('customerLanguage'); $tmpvar['language'] = hesk_POST('customerLanguage');
$tmpvar['name'] = hesk_input(hesk_POST('name')) or $hesk_error_buffer[] = $hesklang['enter_your_name']; $tmpvar['name'] = hesk_input(hesk_POST('name')) or $hesk_error_buffer[] = $hesklang['enter_your_name'];
$tmpvar['email'] = hesk_validateEmail(hesk_POST('email'), 'ERR', 0); $tmpvar['email'] = hesk_validateEmail(hesk_POST('email'), 'ERR', 0);
$tmpvar['subject'] = hesk_input(hesk_POST('subject')) or $hesk_error_buffer[] = $hesklang['enter_ticket_subject']; $tmpvar['subject'] = hesk_input(hesk_POST('subject')) or $hesk_error_buffer[] = $hesklang['enter_ticket_subject'];
$tmpvar['message'] = hesk_input(hesk_POST('message')) or $hesk_error_buffer[] = $hesklang['enter_message']; $tmpvar['message'] = hesk_input(hesk_POST('message')) or $hesk_error_buffer[] = $hesklang['enter_message'];
$tmpvar['html'] = hesk_POST('html');
// Demo mode // Demo mode
if (defined('HESK_DEMO')) { if (defined('HESK_DEMO')) {
@ -129,8 +132,10 @@ if (isset($_POST['save'])) {
hesk_error($myerror); hesk_error($myerror);
} }
$tmpvar['message'] = hesk_makeURL($tmpvar['message']); if (!$tmpvar['html']) {
$tmpvar['message'] = nl2br($tmpvar['message']); $tmpvar['message'] = hesk_makeURL($tmpvar['message']);
$tmpvar['message'] = nl2br($tmpvar['message']);
}
foreach ($hesk_settings['custom_fields'] as $k => $v) { foreach ($hesk_settings['custom_fields'] as $k => $v) {
if ($v['use'] && isset($_POST[$k])) { if ($v['use'] && isset($_POST[$k])) {
@ -175,7 +180,8 @@ if (isset($_POST['save'])) {
`custom18`='" . hesk_dbEscape($tmpvar['custom18']) . "', `custom18`='" . hesk_dbEscape($tmpvar['custom18']) . "',
`custom19`='" . hesk_dbEscape($tmpvar['custom19']) . "', `custom19`='" . hesk_dbEscape($tmpvar['custom19']) . "',
`custom20`='" . hesk_dbEscape($tmpvar['custom20']) . "', `custom20`='" . hesk_dbEscape($tmpvar['custom20']) . "',
`language`='" . hesk_dbEscape($tmpvar['language']) . "' `language`='" . hesk_dbEscape($tmpvar['language']) . "',
`html`='" . hesk_dbEscape($tmpvar['html']) . "'
WHERE `id`='" . intval($ticket['id']) . "' LIMIT 1"); WHERE `id`='" . intval($ticket['id']) . "' LIMIT 1");
} }
@ -223,7 +229,9 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</select> </select>
</div> </div>
</div> </div>
<?php } ?> <?php } else {
echo '<input type="hidden" name="customerLanguage" value="' . $ticket['language'] . '">';
} ?>
<div class="form-group"> <div class="form-group">
<label for="subject" class="col-sm-3 control-label"><?php echo $hesklang['subject']; ?>:</label> <label for="subject" class="col-sm-3 control-label"><?php echo $hesklang['subject']; ?>:</label>
@ -471,6 +479,10 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?> ?>
</div> </div>
<div class="form-group" style="text-align: center"> <div class="form-group" style="text-align: center">
<?php
$html = $modsForHesk_settings['rich_text_for_tickets'] ? 1 : 0;
?>
<input type="hidden" name="html" value="<?php echo $html; ?>">
<input type="submit" value="<?php echo $hesklang['save_changes']; ?>" class="btn btn-default"/> <input type="submit" value="<?php echo $hesklang['save_changes']; ?>" class="btn btn-default"/>
<?php if (isset($_REQUEST['isManager']) && $_REQUEST['isManager']): ?> <?php if (isset($_REQUEST['isManager']) && $_REQUEST['isManager']): ?>
<input type="hidden" name="isManager" value="1"> <input type="hidden" name="isManager" value="1">

@ -49,6 +49,8 @@ hesk_session_start();
hesk_dbConnect(); hesk_dbConnect();
hesk_isLoggedIn(); hesk_isLoggedIn();
$modsForHesk_settings = mfh_getSettings();
/* Check permissions for this feature */ /* Check permissions for this feature */
if ( ! hesk_checkPermission('can_man_kb',0)) if ( ! hesk_checkPermission('can_man_kb',0))
{ {

@ -725,7 +725,7 @@ function hesk_validateUserInfo($pass_required = 1, $redirect_to = './manage_user
} }
} }
if (strlen($myuser['signature']) > 255) { if (strlen($myuser['signature']) > 1000) {
$hesk_error_buffer .= '<li>' . $hesklang['signature_long'] . '</li>'; $hesk_error_buffer .= '<li>' . $hesklang['signature_long'] . '</li>';
} }

@ -344,13 +344,13 @@ foreach ($hesk_settings['custom_fields'] as $k => $v) {
$k_value[] = stripslashes(hesk_input($myCB)); $k_value[] = stripslashes(hesk_input($myCB));
} }
} }
} elseif (isset($_SESSION["c_$k"])) { } elseif (isset($_SESSION["as_$k"])) {
$k_value = stripslashes(hesk_input($_SESSION["c_$k"])); $k_value = stripslashes(hesk_input($_SESSION["as_$k"]));
} elseif (isset($_GET["c_$k"])) { } elseif (isset($_GET["as_$k"])) {
if ($v['type'] == 'checkbox') { if ($v['type'] == 'checkbox') {
$k_value = explode('-CHECKBOX-', $_GET["c_$k"]); $k_value = explode('-CHECKBOX-', $_GET["as_$k"]);
} else { } else {
$k_value = stripslashes(hesk_GET("c_$k")); $k_value = stripslashes(hesk_GET("as_$k"));
} }
} else { } else {
$k_value = ''; $k_value = '';

@ -172,7 +172,6 @@ elseif (isset($_GET['h'])) {
$hash = preg_replace('/[^a-zA-Z0-9]/', '', $_GET['h']); $hash = preg_replace('/[^a-zA-Z0-9]/', '', $_GET['h']);
// Connect to database // Connect to database
hesk_load_database_functions();
hesk_dbConnect(); hesk_dbConnect();
// Expire verification hashes older than 2 hours // Expire verification hashes older than 2 hours

@ -178,7 +178,7 @@ function update_profile()
$_SESSION['new']['signature'] = hesk_input(hesk_POST('signature')); $_SESSION['new']['signature'] = hesk_input(hesk_POST('signature'));
/* Signature */ /* Signature */
if (strlen($_SESSION['new']['signature']) > 255) { if (strlen($_SESSION['new']['signature']) > 1000) {
$hesk_error_buffer .= '<li>' . $hesklang['signature_long'] . '</li>'; $hesk_error_buffer .= '<li>' . $hesklang['signature_long'] . '</li>';
} }

@ -127,7 +127,12 @@ if (isset($_GET['kb_att'])) {
// Perhaps the file has been deleted? // Perhaps the file has been deleted?
if (!file_exists($realpath)) { if (!file_exists($realpath)) {
hesk_error($hesklang['attdel']); // Let's try the ticket attachment folder. Legacy KB attachments are not automatically migrated.
$realpath = $hesk_settings['attach_dir'] . '/' . $file['saved_name'];
if (!file_exists($realpath)) {
hesk_error($hesklang['attdel']);
}
} }
// Update the download count // Update the download count
@ -161,5 +166,4 @@ if ($file['size'] > $chunksize) {
readfile($realpath); readfile($realpath);
} }
exit(); exit();
?>

@ -1607,18 +1607,20 @@ function hesk_error($error, $showback = 1)
</ol> </ol>
<div class="row"> <div class="row">
<div class="col-md-10 col-md-offset-1"> <div class="col-md-10 col-md-offset-1">
<div class="alert alert-danger"> <div class="alert alert-danger">
<b><?php echo $hesklang['error']; ?>:</b><br/><br/> <b><?php echo $hesklang['error']; ?>:</b><br/><br/>
<?php <?php
echo $error; echo $error;
if ($hesk_settings['debug_mode']) { if ($hesk_settings['debug_mode']) {
echo ' echo '
<p>&nbsp;</p> <p>&nbsp;</p>
<p><span style="color:red;font-weight:bold">' . $hesklang['warn'] . '</span><br />' . $hesklang['dmod'] . '</p>'; <p><span style="color:red;font-weight:bold">' . $hesklang['warn'] . '</span><br />' . $hesklang['dmod'] . '</p>';
} }
?> ?>
</div>
</div>
</div> </div>
<br/> <br/>

@ -29,7 +29,7 @@
*******************************************************************************/ *******************************************************************************/
// Define the current build // Define the current build
define('MODS_FOR_HESK_BUILD', 23); define('MODS_FOR_HESK_BUILD', 24);
/* Check if this is a valid include */ /* Check if this is a valid include */
if (!defined('IN_SCRIPT')) { if (!defined('IN_SCRIPT')) {

@ -29,7 +29,7 @@
*******************************************************************************/ *******************************************************************************/
// Define the current build // Define the current build
define('MODS_FOR_HESK_BUILD', 23); define('MODS_FOR_HESK_BUILD', 24);
/* Check if this is a valid include */ /* Check if this is a valid include */
if (!defined('IN_SCRIPT')) { if (!defined('IN_SCRIPT')) {

@ -1065,7 +1065,8 @@ function print_add_ticket()
?> ?>
<div class="col-md-9"> <div class="col-md-9">
<div class="g-recaptcha" <div class="g-recaptcha"
data-sitekey="<?php echo $hesk_settings['recaptcha_public_key']; ?>"></div> data-sitekey="<?php echo $hesk_settings['recaptcha_public_key']; ?>">
</div>
</div> </div>
<?php <?php
} }
@ -1077,9 +1078,9 @@ function print_add_ticket()
echo $hesklang['sec_enter'] . '<br />&nbsp;<br /><img src="print_sec_img.php?' . rand(10000, 99999) . '" width="150" height="40" alt="' . $hesklang['sec_img'] . '" title="' . $hesklang['sec_img'] . '" border="1" name="secimg" style="vertical-align:text-bottom" /> ' . echo $hesklang['sec_enter'] . '<br />&nbsp;<br /><img src="print_sec_img.php?' . rand(10000, 99999) . '" width="150" height="40" alt="' . $hesklang['sec_img'] . '" title="' . $hesklang['sec_img'] . '" border="1" name="secimg" style="vertical-align:text-bottom" /> ' .
'<a href="javascript:void(0)" onclick="javascript:document.form1.secimg.src=\'print_sec_img.php?\'+ ( Math.floor((90000)*Math.random()) + 10000);"><img src="img/reload.png" height="24" width="24" alt="' . $hesklang['reload'] . '" title="' . $hesklang['reload'] . '" border="0" style="vertical-align:text-bottom" /></a>' . '<a href="javascript:void(0)" onclick="javascript:document.form1.secimg.src=\'print_sec_img.php?\'+ ( Math.floor((90000)*Math.random()) + 10000);"><img src="img/reload.png" height="24" width="24" alt="' . $hesklang['reload'] . '" title="' . $hesklang['reload'] . '" border="0" style="vertical-align:text-bottom" /></a>' .
'<br />&nbsp;<br /><input type="text" name="mysecnum" size="20" maxlength="5" ' . $cls . ' />'; '<br />&nbsp;<br /><input type="text" name="mysecnum" size="20" maxlength="5" ' . $cls . ' /></div>';
} }
echo '</div></div>'; echo '</div>';
} }
?> ?>

@ -37,7 +37,7 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
// We will be installing this HESK version: // We will be installing this HESK version:
define('HESK_NEW_VERSION','2.6.5'); define('HESK_NEW_VERSION','2.6.5');
define('MODS_FOR_HESK_NEW_VERSION','2.5.2'); define('MODS_FOR_HESK_NEW_VERSION','2.5.3');
define('REQUIRE_PHP_VERSION','5.0.0'); define('REQUIRE_PHP_VERSION','5.0.0');
define('REQUIRE_MYSQL_VERSION','5.0.7'); define('REQUIRE_MYSQL_VERSION','5.0.7');

@ -52,6 +52,8 @@ if ($version == 2) {
execute251Scripts(); execute251Scripts();
} elseif ($version == 23) { } elseif ($version == 23) {
execute252Scripts(); execute252Scripts();
} elseif ($version == 24) {
execute253Scripts();
} else { } else {
$response = 'The version "' . $version . '" was not recognized. Check the value submitted and try again.'; $response = 'The version "' . $version . '" was not recognized. Check the value submitted and try again.';
print $response; print $response;

@ -77,6 +77,9 @@ function echoInitialVersionRows($version)
if ($version < 23) { if ($version < 23) {
printRow('2.5.2'); printRow('2.5.2');
} }
if ($version < 24) {
printRow('2.5.3');
}
} }
function printRow($version) function printRow($version)

@ -65,6 +65,9 @@ function processUpdates(startingVersion) {
} else if (startingVersion < 23) { } else if (startingVersion < 23) {
startVersionUpgrade('252'); startVersionUpgrade('252');
executeUpdate(23, '252', '2.5.2'); executeUpdate(23, '252', '2.5.2');
} else if (startingVersion < 24) {
startVersionUpgrade('253');
executeUpdate(24, '253', '2.5.3');
} else { } else {
installationFinished(); installationFinished();
} }

@ -122,7 +122,7 @@ hesk_dbConnect();
if ($version != MODS_FOR_HESK_NEW_VERSION) { if ($version != MODS_FOR_HESK_NEW_VERSION) {
echo '<div class="row">'; echo '<div class="row">';
echo '<div class="col-sm-12">'; echo '<div class="col-sm-12">';
echo '<p id="updateText">Mods for HESK has detected that you currently have ' . $version . ' installed. echo '<p id="updateText">Mods for HESK has detected that you currently have version ' . $version . ' installed.
The button you should click to upgrade has been highlighted for you. However, if The button you should click to upgrade has been highlighted for you. However, if
Mods for HESK selected the wrong version, click <a href="javascript:void(0)" onclick="enableAllDisablable();">here</a> to reset them.</p>'; Mods for HESK selected the wrong version, click <a href="javascript:void(0)" onclick="enableAllDisablable();">here</a> to reset them.</p>';
echo '</div>'; echo '</div>';
@ -130,6 +130,18 @@ hesk_dbConnect();
} }
?> ?>
<div class="row"> <div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.5.2') {
$v252btn = 'btn-success';
$disableAllExcept = '252';
} else {
$v252btn = 'btn-default';
}
?>
<a id="252" class="btn <?php echo $v252btn; ?> btn-block disablable"
href="installModsForHesk.php?v=23">2.5.2</a>
</div>
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.5.1') { if ($version == '2.5.1') {
@ -166,6 +178,10 @@ hesk_dbConnect();
<a id="242" class="btn <?php echo $v242btn; ?> btn-block disablable" <a id="242" class="btn <?php echo $v242btn; ?> btn-block disablable"
href="installModsForHesk.php?v=20">2.4.2</a> href="installModsForHesk.php?v=20">2.4.2</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.4.1') { if ($version == '2.4.1') {
@ -178,10 +194,6 @@ hesk_dbConnect();
<a id="241" class="btn <?php echo $v241btn; ?> btn-block disablable" <a id="241" class="btn <?php echo $v241btn; ?> btn-block disablable"
href="installModsForHesk.php?v=19">2.4.1</a> href="installModsForHesk.php?v=19">2.4.1</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.4.0') { if ($version == '2.4.0') {
@ -218,6 +230,10 @@ hesk_dbConnect();
<a id="231" class="btn <?php echo $v231btn; ?> btn-block disablable" <a id="231" class="btn <?php echo $v231btn; ?> btn-block disablable"
href="installModsForHesk.php?v=16">2.3.1</a> href="installModsForHesk.php?v=16">2.3.1</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.3.0') { if ($version == '2.3.0') {
@ -230,10 +246,6 @@ hesk_dbConnect();
<a id="230" class="btn <?php echo $v230btn; ?> btn-block disablable" <a id="230" class="btn <?php echo $v230btn; ?> btn-block disablable"
href="installModsForHesk.php?v=15">2.3.0</a> href="installModsForHesk.php?v=15">2.3.0</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.2.1') { if ($version == '2.2.1') {
@ -270,6 +282,10 @@ hesk_dbConnect();
<a id="211" class="btn <?php echo $v211btn; ?> btn-block disablable" <a id="211" class="btn <?php echo $v211btn; ?> btn-block disablable"
href="installModsForHesk.php?v=12">2.1.1</a> href="installModsForHesk.php?v=12">2.1.1</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.1.0') { if ($version == '2.1.0') {
@ -282,10 +298,6 @@ hesk_dbConnect();
<a id="210" class="btn <?php echo $v210btn; ?> btn-block disablable" <a id="210" class="btn <?php echo $v210btn; ?> btn-block disablable"
href="installModsForHesk.php?v=11">2.1.0</a> href="installModsForHesk.php?v=11">2.1.0</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.0.1') { if ($version == '2.0.1') {
@ -322,6 +334,10 @@ hesk_dbConnect();
<a id="170" class="btn <?php echo $v170btn; ?> btn-block disablable" <a id="170" class="btn <?php echo $v170btn; ?> btn-block disablable"
href="installModsForHesk.php?v=8">1.7.0</a> href="installModsForHesk.php?v=8">1.7.0</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '1.6.1') { if ($version == '1.6.1') {
@ -334,10 +350,6 @@ hesk_dbConnect();
<a id="161" class="btn <?php echo $v161btn; ?> btn-block disablable" <a id="161" class="btn <?php echo $v161btn; ?> btn-block disablable"
href="installModsForHesk.php?v=7">1.6.1</a> href="installModsForHesk.php?v=7">1.6.1</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
@ -359,14 +371,14 @@ hesk_dbConnect();
<a id="141" class="btn btn-default btn-block disablable" <a id="141" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=4">1.4.1</a> href="installModsForHesk.php?v=4">1.4.1</a>
</div> </div>
<div class="col-md-3 col-sm-12">
<a id="140" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=3">1.4.0</a>
</div>
</div> </div>
<br> <br>
<div class="row"> <div class="row">
<div class="col-md-3 col-sm-12">
<a id="140" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=3">1.4.0</a>
</div>
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<a id="130" class="btn btn-default btn-block disablable" <a id="130" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=2">1.3.0</a> href="installModsForHesk.php?v=2">1.3.0</a>

@ -693,4 +693,13 @@ function execute252Scripts()
hesk_dbConnect(); hesk_dbConnect();
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.2' WHERE `Key` = 'modsForHeskVersion'"); executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.2' WHERE `Key` = 'modsForHeskVersion'");
}
// Version 2.5.3
function execute253Scripts()
{
global $hesk_settings;
hesk_dbConnect();
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.3' WHERE `Key` = 'modsForHeskVersion'");
} }

@ -36,12 +36,16 @@ require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php'); require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/knowledgebase_functions.inc.php'); require(HESK_PATH . 'inc/knowledgebase_functions.inc.php');
// Are we in maintenance mode?
hesk_check_maintenance();
// Load Knowledgebase-related functions // Load Knowledgebase-related functions
hesk_load_database_functions(); hesk_load_database_functions();
/* Connect to database */
hesk_dbConnect();
// Are we in maintenance mode?
hesk_check_maintenance();
define('PAGE_TITLE', 'CUSTOMER_KB'); define('PAGE_TITLE', 'CUSTOMER_KB');
/* Is Knowledgebase enabled? */ /* Is Knowledgebase enabled? */
@ -49,9 +53,6 @@ if (!$hesk_settings['kb_enable']) {
hesk_error($hesklang['kbdis']); hesk_error($hesklang['kbdis']);
} }
/* Connect to database */
hesk_dbConnect();
/* Rating? */ /* Rating? */
if (isset($_GET['rating'])) { if (isset($_GET['rating'])) {
// Detect and block robots // Detect and block robots

@ -40,14 +40,16 @@ require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php'); require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/view_attachment_functions.inc.php'); require(HESK_PATH . 'inc/view_attachment_functions.inc.php');
// Are we in maintenance mode?
hesk_check_maintenance();
hesk_load_database_functions(); hesk_load_database_functions();
hesk_session_start();
/* Connect to database */ /* Connect to database */
hesk_dbConnect(); hesk_dbConnect();
// Are we in maintenance mode?
hesk_check_maintenance();
hesk_session_start();
$modsForHesk_settings = mfh_getSettings(); $modsForHesk_settings = mfh_getSettings();
$hesk_error_buffer = array(); $hesk_error_buffer = array();

Loading…
Cancel
Save