Skip to content
Snippets Groups Projects
Commit 5ff1ed65 authored by Jared Hancock's avatar Jared Hancock
Browse files

install: Fix incomplete settings on install

parent 2cba82e5
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ core:
date_format: 'm/d/Y'
datetime_format: 'm/d/Y g:i a'
daydatetime_format: 'D, M j Y g:ia'
default_timezone_id: 0
default_timezone_id: 8
default_priority_id: 2
enable_daylight_saving: 0
......@@ -31,12 +31,7 @@ core:
max_user_file_uploads: 1
max_staff_file_uploads: 1
autolock_minutes: 3
alert_email_id: 0
default_email_id: 0
default_dept_id: 0
default_sla_id: 0
default_priority_id: 2
default_template_id: 1
default_smtp_id: 0
use_email_priority: 0
enable_kb: 0
......
......@@ -199,20 +199,18 @@ class Installer extends SetupWizard {
//Create config settings---default settings!
//XXX: rename ostversion helpdesk_* ??
// XXX: Some of this can go to the core install file
$defaults = array('isonline'=>'0', 'default_email_id'=>$support_email_id,
'alert_email_id'=>$alert_email_id, 'default_dept_id'=>$dept_id_1, 'default_sla_id'=>$sla_id_1,
'default_timezone_id'=>$default_timezone, 'default_template_id'=>$template_id_1,
'admin_email'=>db_input($vars['admin_email']),
'schema_signature'=>db_input($signature),
'helpdesk_url'=>db_input(URL),
'helpdesk_title'=>db_input($vars['name']));
foreach ($defaults as $key=>$value) {
$sql='UPDATE '.PREFIX.'config SET updated=NOW(), value='.$value
.' WHERE namespace="core" AND `key`='.db_input($key);
if(!db_query($sql, false))
$this->errors['err']='Unable to create config settings (#7)';
}
$defaults = array(
'default_email_id'=>$support_email_id,
'alert_email_id'=>$alert_email_id,
'default_dept_id'=>$dept_id_1, 'default_sla_id'=>$sla_id_1,
'default_template_id'=>$template_id_1,
'admin_email'=>$vars['admin_email'],
'schema_signature'=>$signature,
'helpdesk_url'=>URL,
'helpdesk_title'=>$vars['name']);
$config = new Config('core');
if (!$config->updateAll($defaults))
$this->errors['err']='Unable to create config settings (#7)';
// Set company name
require_once(INCLUDE_DIR.'class.company.php');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment