diff --git a/index.php b/index.php index 27d6349c..33d2862f 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,7 @@ $v) + { + if ($v['use'] && isset($_REQUEST[$k]) ) + { + $_SESSION['c_'.$k] = $_REQUEST[$k]; + } + } + + + // Variables for coloring the fields in case of errors if ( ! isset($_SESSION['iserror'])) { $_SESSION['iserror'] = array(); @@ -82,13 +140,19 @@ function print_add_ticket() $_SESSION['isnotice'] = array(); } - if ( ! isset($_SESSION['c_category'])) +if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat']) { $_SESSION['c_category'] = 0; } hesk_cleanSessionVars('already_submitted'); + // Tell header to load reCaptcha API if needed + if ($hesk_settings['recaptcha_use'] == 2) + { + define('RECAPTCHA',1); + } + // Print header $hesk_settings['tmp_title'] = $hesk_settings['hesk_title'] . ' - ' . $hesklang['submit_ticket']; require_once(HESK_PATH . 'inc/header.inc.php'); @@ -135,7 +199,7 @@ function print_add_ticket()