#327 Replaced all instances (I think?) of $modsForHesk_settings

merge-requests/2/head
Mike Koch 9 years ago
parent 22465d68dc
commit 264c2e028e

@ -40,7 +40,6 @@ if (is_dir(HESK_PATH . 'install')) {die('Please delete the <b>install</b> folder
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/status_functions.inc.php');

@ -37,7 +37,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions();
@ -139,14 +138,14 @@ if (strlen($message))
// Attach signature to the message?
if ( ! $submit_as_customer && ! empty($_POST['signature']))
{
if ($modsForHesk_settings['rich_text_for_tickets']) {
if (mfh_getSetting('rich_text_for_tickets')) {
$message .= "<br><br>" . nl2br($_SESSION['signature']) . "<br>";
} else {
$message .= "\n\n" . addslashes($_SESSION['signature']) . "\n";
}
}
if (!$modsForHesk_settings['rich_text_for_tickets']) {
if (!mfh_getSetting('rich_text_for_tickets')) {
// Make links clickable
$message = hesk_makeURL($message);
@ -211,7 +210,7 @@ if ($hesk_settings['attachments']['use'] && !empty($attachments))
}
// Add reply
$html = $modsForHesk_settings['rich_text_for_tickets'];
$html = mfh_getSetting('rich_text_for_tickets');
if ($submit_as_customer)
{
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` (`replyto`,`name`,`message`,`dt`,`attachments`,`html`) VALUES ('".intval($replyto)."','".hesk_dbEscape(addslashes($ticket['name']))."','".hesk_dbEscape($message."<br /><br /><i>{$hesklang['creb']} {$_SESSION['name']}</i>")."',NOW(),'".hesk_dbEscape($myattachments)."', '".$html."')");

@ -42,7 +42,6 @@ if (is_dir(HESK_PATH . 'install')) {die('Please delete the <b>install</b> folder
// Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
// Save the default language for the settings page before choosing user's preferred one
$hesk_settings['language_default'] = $hesk_settings['language'];
@ -824,8 +823,8 @@ if ( defined('HESK_DEMO') )
</label>
<div class="col-sm-6">
<?php
$on = $modsForHesk_settings['category_order_column'] == 'name' ? 'checked' : '';
$off = $modsForHesk_settings['category_order_column'] == 'name' ? '' : 'checked';
$on = mfh_getSetting('category_order_column') == 'name' ? 'checked' : '';
$off = mfh_getSetting('category_order_column') == 'name' ? '' : 'checked';
echo '
<div class="radio"><label><input type="radio" name="category_order_column" value="0" '.$off.'>'.$hesklang['sort_by_user_defined_order'].'</label></div>
<div class="radio"><label><input type="radio" name="category_order_column" value="1" '.$on.'>'.$hesklang['sort_alphabetically'].'</label></div>
@ -845,9 +844,9 @@ if ( defined('HESK_DEMO') )
</label>
<div class="col-sm-6 form-inline">
<?php
$both = $modsForHesk_settings['rich_text_for_tickets'] && $modsForHesk_settings['rich_text_for_tickets_for_customers'] ? 'checked' : '';
$staff = $modsForHesk_settings['rich_text_for_tickets'] && !$modsForHesk_settings['rich_text_for_tickets_for_customers'] ? 'checked' : '';
$no = $modsForHesk_settings['rich_text_for_tickets'] && $modsForHesk_settings['rich_text_for_tickets_for_customers'] ? '' : 'checked';
$both = mfh_getSetting('rich_text_for_tickets') && mfh_getSetting('rich_text_for_tickets_for_customers') ? 'checked' : '';
$staff = mfh_getSetting('rich_text_for_tickets') && !mfh_getSetting('rich_text_for_tickets_for_customers') ? 'checked' : '';
$no = mfh_getSetting('rich_text_for_tickets') && mfh_getSetting('rich_text_for_tickets_for_customers') ? '' : 'checked';
echo '
<div class="radio"><label><input type="radio" name="rich_text_for_tickets" value="0" '.$no.'> '.$hesklang['off'].'</label></div>&nbsp;&nbsp;&nbsp;
<div class="radio"><label><input type="radio" name="rich_text_for_tickets" value="1" '.$staff.'> '.$hesklang['staff_only'].'</label></div>&nbsp;&nbsp;&nbsp;
@ -868,8 +867,8 @@ if ( defined('HESK_DEMO') )
</label>
<div class="col-sm-6">
<?php
$on = $modsForHesk_settings['statuses_order_column'] == 'name' ? 'checked' : '';
$off = $modsForHesk_settings['statuses_order_column'] == 'name' ? '' : 'checked';
$on = mfh_getSetting('statuses_order_column') == 'name' ? 'checked' : '';
$off = mfh_getSetting('statuses_order_column') == 'name' ? '' : 'checked';
echo '
<div class="radio"><label><input type="radio" name="statuses_order_column" value="0" '.$off.'>'.$hesklang['sort_by_user_defined_order'].'</label></div>
<div class="radio"><label><input type="radio" name="statuses_order_column" value="1" '.$on.'>'.$hesklang['sort_alphabetically'].'</label></div>
@ -952,8 +951,8 @@ if ( defined('HESK_DEMO') )
</label>
<div class="col-sm-6 form-inline">
<?php
$on = $modsForHesk_settings['request_location'] ? 'checked' : '';
$off = $modsForHesk_settings['request_location'] ? '' : 'checked';
$on = mfh_getSetting('request_location') ? 'checked' : '';
$off = mfh_getSetting('request_location') ? '' : 'checked';
echo '
<div class="radio"><label><input type="radio" name="request_location" value="0" '.$off.' /> '.$hesklang['off'].'</label></div>&nbsp;&nbsp;&nbsp;
<div class="radio"><label><input type="radio" name="request_location" value="1" '.$on.' /> '.$hesklang['on'].'</label></div>';
@ -1148,7 +1147,7 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-8 col-xs-12">
<div class="checkbox">
<label>
<input id="email-verification" name="email-verification" type="checkbox" <?php if ($modsForHesk_settings['customer_email_verification_required']) {echo 'checked';} ?>> <?php echo $hesklang['require_customer_validate_email']; ?>
<input id="email-verification" name="email-verification" type="checkbox" <?php if (mfh_getSetting('customer_email_verification_required')) {echo 'checked';} ?>> <?php echo $hesklang['require_customer_validate_email']; ?>
</label>
</div>
</div>
@ -1274,7 +1273,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['kb_attach_dir_help']; ?>"></i>
</label>
<div class="col-sm-8">
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['kb_attach_dir']); ?>" name="kb_attach_dir" size="40" maxlength="255" value="<?php echo $modsForHesk_settings['kb_attach_dir']; ?>">
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['kb_attach_dir']); ?>" name="kb_attach_dir" size="40" maxlength="255" value="<?php echo mfh_getSetting('kb_attach_dir'); ?>">
</div>
</div>
<div class="form-group">
@ -1290,7 +1289,7 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-8 col-xs-12">
<div class="radio">
<label>
<input type="radio" name="new_kb_article_visibility" value="0" <?php echo $modsForHesk_settings['new_kb_article_visibility'] == 0 ? 'checked' : ''; ?>>
<input type="radio" name="new_kb_article_visibility" value="0" <?php echo mfh_getSetting('new_kb_article_visibility') == 0 ? 'checked' : ''; ?>>
<?php echo $hesklang['kb_published']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
title="<?php echo $hesklang['kb_published']; ?>"
@ -1299,7 +1298,7 @@ if ( defined('HESK_DEMO') )
</div>
<div class="radio">
<label>
<input type="radio" name="new_kb_article_visibility" value="1" <?php echo $modsForHesk_settings['new_kb_article_visibility'] == 1 ? 'checked' : ''; ?>>
<input type="radio" name="new_kb_article_visibility" value="1" <?php echo mfh_getSetting('new_kb_article_visibility') == 1 ? 'checked' : ''; ?>>
<?php echo $hesklang['kb_private']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
title="<?php echo $hesklang['kb_private']; ?>"
@ -1308,7 +1307,7 @@ if ( defined('HESK_DEMO') )
</div>
<div class="radio">
<label>
<input type="radio" name="new_kb_article_visibility" value="2" <?php echo $modsForHesk_settings['new_kb_article_visibility'] == 2 ? 'checked' : ''; ?>>
<input type="radio" name="new_kb_article_visibility" value="2" <?php echo mfh_getSetting('new_kb_article_visibility') == 2 ? 'checked' : ''; ?>>
<?php echo $hesklang['kb_draft']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
title="<?php echo $hesklang['kb_draft']; ?>"
@ -1488,7 +1487,7 @@ if ( defined('HESK_DEMO') )
'<?php echo $hesklang['custom_language_key']; ?>',
'<?php echo $hesklang['custom_n']; ?>',
this)"
<?php if ($modsForHesk_settings['custom_field_setting']) {echo 'checked';} ?>> <?php echo $hesklang['enable_custom_field_language']; ?>
<?php if (mfh_getSetting('custom_field_setting')) {echo 'checked';} ?>> <?php echo $hesklang['enable_custom_field_language']; ?>
</label>
</div>
</div>
@ -1499,7 +1498,7 @@ if ( defined('HESK_DEMO') )
<th><?php echo $hesklang['s_type']; ?></th>
<th><?php echo $hesklang['custom_r']; ?></th>
<th id="fieldNameHeader">
<?php if ($modsForHesk_settings['custom_field_setting']) { echo $hesklang['custom_language_key']; } else { echo $hesklang['custom_n']; } ?>
<?php if (mfh_getSetting('custom_field_setting')) { echo $hesklang['custom_language_key']; } else { echo $hesklang['custom_n']; } ?>
</th>
<th><?php echo $hesklang['custom_place']; ?></th>
<th><?php echo $hesklang['opt']; ?></th>
@ -1569,7 +1568,7 @@ if ( defined('HESK_DEMO') )
$on = 'checked="checked"';
$onload_div = 'block';
}
elseif ($modsForHesk_settings['use_mailgun'])
elseif (mfh_getSetting('use_mailgun'))
{
$mailgunOn = 'checked="checked"';
$onload_mailgun = 'block';
@ -1635,7 +1634,7 @@ if ( defined('HESK_DEMO') )
</i>
</label>
<div class="col-sm-9">
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['mailgun_api_key']); ?>" id="mailgun_api_key" name="mailgun_api_key" value="<?php echo $modsForHesk_settings['mailgun_api_key']; ?>">
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['mailgun_api_key']); ?>" id="mailgun_api_key" name="mailgun_api_key" value="<?php echo mfh_getSetting('mailgun_api_key'); ?>">
</div>
</div>
<div class="form-group">
@ -1647,7 +1646,7 @@ if ( defined('HESK_DEMO') )
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover" title="<?php echo $hesklang['mailgun_domain']; ?>" data-content="<?php echo $hesklang['mailgun_domain_help']; ?>"></i>
</label>
<div class="col-sm-9">
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['mailgun_domain']); ?>" id="mailgun_domain" name="mailgun_domain" value="<?php echo $modsForHesk_settings['mailgun_domain']; ?>">
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['mailgun_domain']); ?>" id="mailgun_domain" name="mailgun_domain" value="<?php echo mfh_getSetting('mailgun_domain'); ?>">
</div>
</div>
</div>
@ -2064,7 +2063,7 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-9">
<div class="checkbox">
<?php
if ($modsForHesk_settings['customer_email_verification_required'])
if (mfh_getSetting('customer_email_verification_required'))
{
?>
<label>
@ -2113,7 +2112,7 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-9 col-xs-12">
<div class="checkbox">
<label>
<input id="html_emails" name="html_emails" type="checkbox" <?php if ($modsForHesk_settings['html_emails']) {echo 'checked';} ?>> <?php echo $hesklang['html_emails_text']; ?>
<input id="html_emails" name="html_emails" type="checkbox" <?php if (mfh_getSetting('html_emails')) {echo 'checked';} ?>> <?php echo $hesklang['html_emails_text']; ?>
</label>
</div>
</div>
@ -2131,13 +2130,13 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-9 col-xs-12">
<div class="radio">
<label>
<input type="radio" name="email_attachments" value="0" <?php echo $modsForHesk_settings['attachments'] == 0 ? 'checked' : ''; ?>>
<input type="radio" name="email_attachments" value="0" <?php echo mfh_getSetting('attachments') == 0 ? 'checked' : ''; ?>>
<?php echo $hesklang['show_attachments_as_links']; ?>
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="email_attachments" value="1" <?php echo $modsForHesk_settings['attachments'] == 1 ? 'checked' : ''; ?>>
<input type="radio" name="email_attachments" value="1" <?php echo mfh_getSetting('attachments') == 1 ? 'checked' : ''; ?>>
<?php echo $hesklang['attach_directly_to_email']; ?>
</label>
</div>
@ -2176,7 +2175,7 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" name="show_number_merged" <?php if ($modsForHesk_settings['show_number_merged']) {echo 'checked';} ?>> <?php echo $hesklang['show_number_merged_descr']; ?>
<input type="checkbox" name="show_number_merged" <?php if (mfh_getSetting('show_number_merged')) {echo 'checked';} ?>> <?php echo $hesklang['show_number_merged_descr']; ?>
</label>
</div>
</div>
@ -2318,7 +2317,7 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-8 col-xs-12">
<div class="checkbox">
<label>
<input id="rtl" name="rtl" type="checkbox" <?php if ($modsForHesk_settings['rtl']) {echo 'checked' ;} ?>> <?php echo $hesklang['display_rtl']; ?>
<input id="rtl" name="rtl" type="checkbox" <?php if (mfh_getSetting('rtl')) {echo 'checked' ;} ?>> <?php echo $hesklang['display_rtl']; ?>
</label>
</div>
</div>
@ -2336,7 +2335,7 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-8 col-xs-12">
<div class="checkbox">
<label>
<input id="show-icons" name="show-icons" type="checkbox" <?php if ($modsForHesk_settings['show_icons']) {echo 'checked';} ?>> <?php echo $hesklang['show_icons_navigation']; ?>
<input id="show-icons" name="show-icons" type="checkbox" <?php if (mfh_getSetting('show_icons')) {echo 'checked';} ?>> <?php echo $hesklang['show_icons_navigation']; ?>
</label>
</div>
</div>
@ -2354,7 +2353,7 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-8 col-xs-12">
<div class="checkbox">
<label>
<input id="use_boostrap_theme" name="use_bootstrap_theme" type="checkbox" <?php if ($modsForHesk_settings['use_bootstrap_theme']) {echo 'checked';} ?>> <?php echo $hesklang['use_bootstrap_theme']; ?>
<input id="use_boostrap_theme" name="use_bootstrap_theme" type="checkbox" <?php if (mfh_getSetting('use_bootstrap_theme')) {echo 'checked';} ?>> <?php echo $hesklang['use_bootstrap_theme']; ?>
</label>
</div>
</div>
@ -2381,7 +2380,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarBackgroundColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarBackgroundColor" name="navbarBackgroundColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarBackgroundColor']; ?>">
<input type="text" id="navbarBackgroundColor" name="navbarBackgroundColor" class="form-control" value="<?php echo mfh_getSetting('navbarBackgroundColor'); ?>">
</div>
</div>
</div>
@ -2393,7 +2392,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarBrandColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarBrandColor" name="navbarBrandColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarBrandColor']; ?>">
<input type="text" id="navbarBrandColor" name="navbarBrandColor" class="form-control" value="<?php echo mfh_getSetting('navbarBrandColor'); ?>">
</div>
</div>
</div>
@ -2407,7 +2406,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarBrandHoverColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarBrandHoverColor" name="navbarBrandHoverColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarBrandHoverColor']; ?>">
<input type="text" id="navbarBrandHoverColor" name="navbarBrandHoverColor" class="form-control" value="<?php echo mfh_getSetting('navbarBrandHoverColor'); ?>">
</div>
</div>
</div>
@ -2419,7 +2418,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarItemTextColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarItemTextColor" name="navbarItemTextColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarItemTextColor']; ?>">
<input type="text" id="navbarItemTextColor" name="navbarItemTextColor" class="form-control" value="<?php echo mfh_getSetting('navbarItemTextColor'); ?>">
</div>
</div>
</div>
@ -2433,7 +2432,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarItemTextHoverColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarItemTextHoverColor" name="navbarItemTextHoverColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarItemTextHoverColor']; ?>">
<input type="text" id="navbarItemTextHoverColor" name="navbarItemTextHoverColor" class="form-control" value="<?php echo mfh_getSetting('navbarItemTextHoverColor'); ?>">
</div>
</div>
</div>
@ -2445,7 +2444,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarItemTextSelectedColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarItemTextSelectedColor" name="navbarItemTextSelectedColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarItemTextSelectedColor']; ?>">
<input type="text" id="navbarItemTextSelectedColor" name="navbarItemTextSelectedColor" class="form-control" value="<?php echo mfh_getSetting('navbarItemTextSelectedColor'); ?>">
</div>
</div>
</div>
@ -2459,7 +2458,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarItemSelectedBackgroundColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarItemSelectedBackgroundColor" name="navbarItemSelectedBackgroundColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarItemSelectedBackgroundColor']; ?>">
<input type="text" id="navbarItemSelectedBackgroundColor" name="navbarItemSelectedBackgroundColor" class="form-control" value="<?php echo mfh_getSetting('navbarItemSelectedBackgroundColor'); ?>">
</div>
</div>
</div>
@ -2471,7 +2470,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['dropdownItemTextColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="dropdownItemTextColor" name="dropdownItemTextColor" class="form-control" value="<?php echo $modsForHesk_settings['dropdownItemTextColor']; ?>">
<input type="text" id="dropdownItemTextColor" name="dropdownItemTextColor" class="form-control" value="<?php echo mfh_getSetting('dropdownItemTextColor'); ?>">
</div>
</div>
</div>
@ -2485,7 +2484,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['dropdownItemTextHoverColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="dropdownItemTextHoverColor" name="dropdownItemTextHoverColor" class="form-control" value="<?php echo $modsForHesk_settings['dropdownItemTextHoverColor']; ?>">
<input type="text" id="dropdownItemTextHoverColor" name="dropdownItemTextHoverColor" class="form-control" value="<?php echo mfh_getSetting('dropdownItemTextHoverColor'); ?>">
</div>
</div>
</div>
@ -2497,7 +2496,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['questionMarkColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="questionMarkColor" name="questionMarkColor" class="form-control" value="<?php echo $modsForHesk_settings['questionMarkColor']; ?>">
<input type="text" id="questionMarkColor" name="questionMarkColor" class="form-control" value="<?php echo mfh_getSetting('questionMarkColor'); ?>">
</div>
</div>
</div>
@ -2511,7 +2510,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['dropdownItemTextHoverBackgroundColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="dropdownItemTextHoverBackgroundColor" name="dropdownItemTextHoverBackgroundColor" class="form-control" value="<?php echo $modsForHesk_settings['dropdownItemTextHoverBackgroundColor']; ?>">
<input type="text" id="dropdownItemTextHoverBackgroundColor" name="dropdownItemTextHoverBackgroundColor" class="form-control" value="<?php echo mfh_getSetting('dropdownItemTextHoverBackgroundColor'); ?>">
</div>
</div>
</div>
@ -2692,7 +2691,7 @@ function hesk_cacheMfhLatestVersion($latest)
function hesk_testLanguage($return_options = 0)
{
global $hesk_settings, $hesklang, $modsForHesk_settings;
global $hesk_settings, $hesklang;
/* Get a list of valid emails */
include_once(HESK_PATH . 'inc/email_functions.inc.php');
@ -2849,7 +2848,7 @@ function hesk_testLanguage($return_options = 0)
background:#fff;
color: black;
font : 68.8%/1.5 Verdana, Geneva, Arial, Helvetica, sans-serif;
text-align: <?php if ($modsForHesk_settings['rtl']) { echo 'right'; } else { echo 'left'; } ?>;
text-align: <?php if (mfh_getSetting('rtl')) { echo 'right'; } else { echo 'left'; } ?>;
}
p

@ -37,7 +37,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/email_functions.inc.php');

@ -37,7 +37,6 @@ define('HESK_PATH','../');
// Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions();
@ -48,6 +47,7 @@ require(HESK_PATH . 'inc/posting_functions.inc.php');
hesk_session_start();
hesk_dbConnect();
hesk_isLoggedIn();
$modsForHesk_settings = mfh_getSettings();
// We only allow POST requests from the HESK form to this file
if ( $_SERVER['REQUEST_METHOD'] != 'POST' )

@ -38,7 +38,6 @@ define('WYSIWYG',1);
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/status_functions.inc.php');
@ -51,6 +50,8 @@ hesk_isLoggedIn();
/* Check permissions for this feature */
hesk_checkPermission('can_view_tickets');
$modsForHesk_settings = mfh_getSettings();
$can_del_notes = hesk_checkPermission('can_del_notes',0);
$can_reply = hesk_checkPermission('can_reply_tickets',0);
$can_delete = hesk_checkPermission('can_del_tickets',0);

@ -38,7 +38,6 @@ define('WYSIWYG',1);
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions();
@ -52,6 +51,7 @@ if (!isset($_REQUEST['isManager']) || !$_REQUEST['isManager']) {
hesk_checkPermission('can_view_tickets');
hesk_checkPermission('can_edit_tickets');
}
$modsForHesk_settings = mfh_getSettings();
/* Ticket ID */
$trackingID = hesk_cleanID() or die($hesklang['int_error'].': '.$hesklang['no_trackID']);

@ -36,7 +36,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/reporting_functions.inc.php');
@ -49,6 +48,7 @@ hesk_isLoggedIn();
// Check permissions for this feature
hesk_checkPermission('can_export');
$modsForHesk_settings = mfh_getSettings();
// Set default values
define('CALENDAR',1);

@ -37,7 +37,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions();

@ -37,7 +37,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions();
@ -78,7 +77,7 @@ function hesk_insertTag(tag) {
var text_to_insert = '%%'+tag+'%%';
var msg = '';
<?php
if ($modsForHesk_settings['rich_text_for_tickets']) { ?>
if (mfh_getSetting('rich_text_for_tickets')) { ?>
msg = tinymce.get("message").getContent();
tinymce.get("message").setContent('');
tinymce.get("message").execCommand('mceInsertRawHTML', false, msg + text_to_insert);
@ -160,7 +159,7 @@ function hesk_insertAtCursor(myField, myValue) {
$javascript_titles.='myTitle['.$mysaved['id'].']=\''.addslashes($mysaved['title'])."';\n";
if ($modsForHesk_settings['rich_text_for_tickets']) {
if (mfh_getSetting('rich_text_for_tickets')) {
$javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", hesk_html_entity_decode($mysaved['message']) )."';\n";
} else {
$javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", addslashes($mysaved['message']) )."';\n";
@ -206,7 +205,7 @@ function hesk_insertAtCursor(myField, myValue) {
</div>
</div>
</div>
<?php if ($modsForHesk_settings['rich_text_for_tickets']): ?>
<?php if (mfh_getSetting('rich_text_for_tickets')): ?>
<script type="text/javascript">
/* <![CDATA[ */
tinyMCE.init({
@ -243,7 +242,7 @@ function hesk_insertAtCursor(myField, myValue) {
function setMessage(msgid)
{
var useHtmlEditor = <?php echo $modsForHesk_settings['rich_text_for_tickets']; ?>;
var useHtmlEditor = <?php echo mfh_getSetting('rich_text_for_tickets'); ?>;
var myMsg=myMsgTxt[msgid];
var mySubject=myTitle[msgid];
@ -352,7 +351,7 @@ function hesk_insertAtCursor(myField, myValue) {
{
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
if (mfh_getSetting('custom_field_setting'))
{
$v['name'] = $hesklang[$v['name']];
}

@ -37,7 +37,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions();
@ -89,7 +88,7 @@ else {return false;}
</script>
<?php
$orderBy = $modsForHesk_settings['category_order_column'];
$orderBy = mfh_getSetting('category_order_column');
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."categories` ORDER BY `".$orderBy."` ASC");
$options='';
while ($mycat=hesk_dbFetchAssoc($res))

@ -37,7 +37,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions();
@ -374,7 +373,7 @@ if (!isset($_SESSION['hide']['new_article']))
$selectedIndex = -1;
} else
{
$selectedIndex = $modsForHesk_settings['new_kb_article_visibility'];
$selectedIndex = mfh_getSetting('new_kb_article_visibility');
}
?>
<div class="radio">

@ -37,7 +37,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions();
@ -82,7 +81,7 @@ else {return false;}
array_push($templates, $row);
}
$featureArray = hesk_getFeatureArray();
$orderBy = $modsForHesk_settings['category_order_column'];
$orderBy = mfh_getSetting('category_order_column');
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."categories` ORDER BY `".$orderBy."` ASC");
$categories = array();
while ($row = hesk_dbFetchAssoc($res)) {

@ -5,7 +5,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/status_functions.inc.php');
@ -380,9 +379,9 @@ function buildConfirmDeleteModal($statusId) {
}
function echoArrows($index, $numberOfStatuses, $statusId) {
global $hesklang, $modsForHesk_settings;
global $hesklang;
if ($modsForHesk_settings['statuses_order_column'] == 'name') {
if (mfh_getSetting('statuses_order_column') == 'name') {
return;
}

@ -37,7 +37,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions();
@ -52,7 +51,7 @@ hesk_checkPermission('can_man_ticket_tpl');
// Define required constants
define('LOAD_TABS',1);
if ($modsForHesk_settings['rich_text_for_tickets']) {
if (mfh_getSetting('rich_text_for_tickets')) {
define('WYSIWYG', 1);
}
@ -132,7 +131,7 @@ $num = hesk_dbNumRows($result);
$options .= (isset($_SESSION['canned']['id']) && $_SESSION['canned']['id'] == $mysaved['id']) ? ' selected="selected" ' : '';
$options .= '>'.$mysaved['title'].'</option>';
if ($modsForHesk_settings['rich_text_for_tickets']) {
if (mfh_getSetting('rich_text_for_tickets')) {
$javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", html_entity_decode($mysaved['message'] ))."';\n";
} else {
$javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", addslashes($mysaved['message']) )."';\n";
@ -243,7 +242,7 @@ $num = hesk_dbNumRows($result);
<textarea id="message" class="form-control htmlEditor" placeholder="<?php echo htmlspecialchars($hesklang['message']); ?>" name="msg" rows="15" cols="70"><?php
if (isset($_SESSION['canned']['msg']))
{
if ($modsForHesk_settings['rich_text_for_tickets']) {
if (mfh_getSetting('rich_text_for_tickets')) {
echo $_SESSION['canned']['msg'];
} else {
echo stripslashes($_SESSION['canned']['msg']);
@ -262,7 +261,7 @@ $num = hesk_dbNumRows($result);
</form>
</div>
</div>
<?php if ($modsForHesk_settings['rich_text_for_tickets']): ?>
<?php if (mfh_getSetting('rich_text_for_tickets')): ?>
<script type="text/javascript">
/* <![CDATA[ */
tinyMCE.init({
@ -299,7 +298,7 @@ $num = hesk_dbNumRows($result);
function setMessage(msgid)
{
var useHtmlEditor = <?php echo $modsForHesk_settings['rich_text_for_tickets']; ?>;
var useHtmlEditor = <?php echo mfh_getSetting('rich_text_for_tickets'); ?>;
var myMsg=myMsgTxt[msgid];
var mySubject=myTitle[msgid];

@ -37,7 +37,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/profile_functions.inc.php');
@ -94,7 +93,7 @@ $default_userdata = array(
);
/* A list of all categories */
$orderBy = $modsForHesk_settings['category_order_column'];
$orderBy = mfh_getSetting('category_order_column');
$hesk_settings['categories'] = array();
$res = hesk_dbQuery('SELECT `id`,`name` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'categories` ORDER BY `'.$orderBy.'` ASC');
while ($row=hesk_dbFetchAssoc($res))

@ -37,7 +37,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
// Is the password reset function enabled?

@ -37,7 +37,6 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/status_functions.inc.php');

@ -1,6 +1,5 @@
<?php
header("Content-type: text/css; charset: UTF-8");
require_once('../modsForHesk_settings.inc.php');
$navbarBackgroundColor = $modsForHesk_settings['navbarBackgroundColor'];
$navbarBrandColor = $modsForHesk_settings['navbarBrandColor'];

@ -41,7 +41,6 @@ require(HESK_PATH . 'inc/common.inc.php');
hesk_load_database_functions();
hesk_session_start();
$modsForHesk_settings = mfh_getSettings();
// Are we in maintenance mode? (check customers only)
if ( empty($SESSION['id']) )
@ -141,7 +140,7 @@ else
// Path of the file on the server
$realpath = $hesk_settings['attach_dir'] . '/' . $file['saved_name'];
if (isset($_GET['kb_att'])) {
$realpath = $modsForHesk_settings['kb_attach_dir'] . '/' . $file['saved_name'];
$realpath = mfh_getSetting('kb_attach_dir') . '/' . $file['saved_name'];
}
// Perhaps the file has been deleted?

@ -1984,6 +1984,7 @@ function mfh_getNumberOfDownloadsForAttachment($att_id, $table='attachments')
return $rec['download_count'];
}
/* @deprecated */
function mfh_getSettings() {
global $hesk_settings;
@ -1994,3 +1995,13 @@ function mfh_getSettings() {
}
return $settings;
}
function mfh_getSetting($key) {
global $hesk_settings;
hesk_dbConnect();
$res = hesk_dbQuery("SELECT `Value` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` WHERE `Key` <> '".hesk_dbEscape($key)."' LIMIT 1");
$row = hesk_dbFetchAssoc($res);
return $row['Value'];
}

@ -35,12 +35,6 @@
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
// Include modsForHesk_settings.inc.php if it hasn't been included already
if (!isset($modsForHesk_settings))
{
include(HESK_PATH . 'modsForHesk_settings.inc.php');
}
/* Get includes for SMTP */
if ($hesk_settings['smtp'])
{
@ -51,6 +45,11 @@ if ($hesk_settings['smtp'])
}
}
// Include common if needed
if (!function_exists('mfh_getSetting')) {
require_once(HESK_PATH . 'common.inc.php');
}
function hesk_notifyCustomerForVerifyEmail($email_template = 'verify_email', $activationKey)
{
global $hesk_settings, $ticket;
@ -339,7 +338,7 @@ function hesk_validEmails()
function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array(),$hasMessageTag = false)
{
global $hesk_settings, $hesklang, $modsForHesk_settings, $ticket;
global $hesk_settings, $hesklang, $ticket;
// Are we in demo mode or are all email fields blank? If so, don't send an email.
if ( defined('HESK_DEMO')
@ -371,15 +370,15 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array(),$
# return true;
// Use mailgun
if ($modsForHesk_settings['use_mailgun'])
if (mfh_getSetting('use_mailgun'))
{
ob_start();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.mailgun.net/v2/".$modsForHesk_settings['mailgun_domain']."/messages");
curl_setopt($ch, CURLOPT_URL, "https://api.mailgun.net/v2/".mfh_getSetting('mailgun_domain')."/messages");
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, 'api:' . $modsForHesk_settings['mailgun_api_key']);
curl_setopt($ch, CURLOPT_USERPWD, 'api:' . mfh_getSetting('mailgun_api_key'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
@ -403,11 +402,11 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array(),$
{
$postfields['bcc'] = implode(',',$bcc);
}
if ($modsForHesk_settings['html_emails'])
if (mfh_getSetting('html_emails'))
{
$postfields['html'] = $htmlMessage;
}
if ($hasMessageTag && $modsForHesk_settings['attachments'] && $hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']))
if ($hasMessageTag && mfh_getSetting('attachments') && $hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']))
{
$postfields = processDirectAttachments('mailgun', $postfields);
}
@ -436,7 +435,7 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array(),$
$message .= "Content-Type: text/plain; charset=".$hesklang['ENCODING']."\n\n";
$message .= $plaintextMessage."\n\n";
//Prepare the message for HTML or non-html
if ($modsForHesk_settings['html_emails'])
if (mfh_getSetting('html_emails'))
{
$message .= "--".$innerboundary."\n";
$message .= "Content-Type: text/html; charset=".$hesklang['ENCODING']."\n\n";
@ -467,7 +466,7 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array(),$
$headers.= "Content-Type: multipart/mixed;boundary=\"".$outerboundary."\"";
// Add attachments if necessary
if ($hasMessageTag && $modsForHesk_settings['attachments'] && $hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']))
if ($hasMessageTag && mfh_getSetting('attachments') && $hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']))
{
$message .= processDirectAttachments('phpmail', NULL, $outerboundary);
}
@ -520,7 +519,7 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array(),$
}
// Add attachments if necessary
if ($hasMessageTag && $modsForHesk_settings['attachments'] && $hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']))
if ($hasMessageTag && mfh_getSetting('attachments') && $hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']))
{
$message .= processDirectAttachments('smtp', NULL, $outerboundary);
}
@ -629,10 +628,10 @@ function hesk_getEmailSubject($eml_file, $ticket='', $is_ticket=1, $strip=0)
function hesk_getHtmlMessage($eml_file, $ticket, $is_admin=0, $is_ticket=1, $just_message=0)
{
global $hesk_settings, $hesklang, $modsForHesk_settings;
global $hesk_settings, $hesklang;
// Demo mode
if ( defined('HESK_DEMO') || !$modsForHesk_settings['html_emails'])
if ( defined('HESK_DEMO') || !mfh_getSetting('html_emails'))
{
return '';
}
@ -700,10 +699,10 @@ function hesk_getEmailMessage($eml_file, $ticket, $is_admin=0, $is_ticket=1, $ju
function hesk_doesTemplateHaveTag($eml_file, $tag)
{
global $hesk_settings, $modsForHesk_settings;
global $hesk_settings;
$path = 'language/' . $hesk_settings['languages'][$hesk_settings['language']]['folder'] . '/emails/'. $eml_file .'.txt';
$htmlHasTag = false;
if ($modsForHesk_settings['html_emails']) {
if (mfh_getSetting('html_emails')) {
$htmlPath = 'language/' . $hesk_settings['languages'][$hesk_settings['language']]['folder'] . '/emails/html/'. $eml_file . '.txt';
$htmlContents = file_get_contents(HESK_PATH.$htmlPath);
$htmlHasTag = !(strpos($htmlContents, $tag) === false);
@ -714,7 +713,7 @@ function hesk_doesTemplateHaveTag($eml_file, $tag)
function hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message, $isForHtml = 0)
{
global $hesk_settings, $hesklang, $modsForHesk_settings;
global $hesk_settings, $hesklang;
/* Return just the message without any processing? */
if ($just_message)
@ -834,10 +833,9 @@ function hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message
}
// Add direct links to any attachments at the bottom of the email message OR add them as attachments, depending on the settings
// if ($modsForHesk_settings['attachments'] == 'inline' (other is 'attachment') {...}
if ($hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']) )
{
if (!$modsForHesk_settings['attachments']) {
if (!mfh_getSetting('attachments')) {
if ($isForHtml) {
$msg .= "<br><br><br>" . $hesklang['fatt'];
} else {

@ -34,7 +34,8 @@
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
require(HESK_PATH . 'modsForHesk_settings.inc.php');
$modsForHesk_settings = mfh_getSettings();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@ -42,7 +43,7 @@ require(HESK_PATH . 'modsForHesk_settings.inc.php');
<title><?php echo (isset($hesk_settings['tmp_title']) ? $hesk_settings['tmp_title'] : $hesk_settings['hesk_title']); ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=<?php echo $hesklang['ENCODING']; ?>" />
<meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="theme-color" content="<?php echo $modsForHesk_settings['navbarBackgroundColor']; ?>">
<meta name="theme-color" content="<?php echo '#414a5c'; ?>">
<?php if ($modsForHesk_settings['rtl']) { ?>
<link href="<?php echo HESK_PATH; ?>hesk_style_RTL.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
<?php } else { ?>

@ -43,7 +43,6 @@ require(HESK_PATH . 'inc/htmLawed.php');
require(HESK_PATH . 'inc/mail/rfc822_addresses.php');
require(HESK_PATH . 'inc/mail/mime_parser.php');
require(HESK_PATH . 'inc/mail/email_parser.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
/*** FUNCTIONS ***/

@ -48,7 +48,6 @@ $trackingID = hesk_cleanID() or die("$hesklang[int_error]: $hesklang[no_trackID]
/* Connect to database */
hesk_dbConnect();
$modsForHesk_settings = mfh_getSettings();
// Perform additional checks for customers
if ( empty($_SESSION['id']) )
@ -124,7 +123,7 @@ hr
background-color: #9e9e9e;
height: 1px;
width: 100%;
text-align: <?php if ($modsForHesk_settings['rtl']) {echo 'right';} else {echo 'left';} ?>;
text-align: <?php if (mfh_getSetting('rtl')) {echo 'right';} else {echo 'left';} ?>;
}
</style>
</head>
@ -221,7 +220,7 @@ foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
if (mfh_getSetting('custom_field_setting'))
{
$v['name'] = $hesklang[$v['name']];
}

@ -37,7 +37,6 @@ define('HESK_PATH','./');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
// Are we in maintenance mode?
@ -66,6 +65,9 @@ hesk_session_start();
/* A security check */
# hesk_token_check('POST');
/* Connect to database */
hesk_dbConnect();
$hesk_error_buffer = array();
// Tracking ID
@ -135,9 +137,6 @@ if (count($hesk_error_buffer)!=0)
hesk_process_messages($hesk_error_buffer,'ticket.php?track='.$trackingID.$hesk_settings['e_param'].'&Refresh='.rand(10000,99999));
}
/* Connect to database */
hesk_dbConnect();
// Check if this IP is temporarily locked out
$res = hesk_dbQuery("SELECT `number` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."logins` WHERE `ip`='".hesk_dbEscape($_SERVER['REMOTE_ADDR'])."' AND `last_attempt` IS NOT NULL AND DATE_ADD(`last_attempt`, INTERVAL ".intval($hesk_settings['attempt_banmin'])." MINUTE ) > NOW() LIMIT 1");
if (hesk_dbNumRows($res) == 1)
@ -205,7 +204,7 @@ $ticket['status'] = $ticket['status'] == $defaultNewTicketStatus['ID'] ? $defaul
$res = hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `lastchange`=NOW(), `status`='{$ticket['status']}', `replies`=`replies`+1, `lastreplier`='0' WHERE `id`='{$ticket['id']}' LIMIT 1");
// Insert reply into database
$html = $modsForHesk_settings['rich_text_for_tickets_for_customers'];
$html = mfh_getSetting('rich_text_for_tickets_for_customers');
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` (`replyto`,`name`,`message`,`dt`,`attachments`, `html`) VALUES ({$ticket['id']},'".hesk_dbEscape($ticket['name'])."','".hesk_dbEscape($message)."',NOW(),'".hesk_dbEscape($myattachments)."','".$html."')");

@ -44,7 +44,6 @@ if ( ! isset($_POST['hx']) || $_POST['hx'] != 3 || ! isset($_POST['hy']) || $_PO
// Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
// Are we in maintenance mode?
@ -276,7 +275,7 @@ foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
if (mfh_getSetting('custom_field_setting'))
{
$v['name'] = $hesklang[$v['name']];
}
@ -448,11 +447,11 @@ $tmpvar['latitude'] = hesk_POST('latitude');
$tmpvar['longitude'] = hesk_POST('longitude');
// Set html
$tmpvar['html'] = $modsForHesk_settings['rich_text_for_tickets_for_customers'];
$tmpvar['html'] = mfh_getSetting('rich_text_for_tickets_for_customers');
// Should the helpdesk validate emails?
$createTicket = true;
if ($modsForHesk_settings['customer_email_verification_required'])
if (mfh_getSetting('customer_email_verification_required'))
{
$verifiedEmailSql = "SELECT `Email` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."verified_emails` WHERE `Email` = '".hesk_dbEscape($tmpvar['email'])."'";
$verifiedEmailRS = hesk_dbQuery($verifiedEmailSql);

@ -4,7 +4,6 @@ define('HESK_PATH','./');
// Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
hesk_load_database_functions();
require(HESK_PATH . 'inc/posting_functions.inc.php');

Loading…
Cancel
Save