Skip to content
Snippets Groups Projects
Commit 65ac8cd8 authored by alpianon's avatar alpianon
Browse files

bux fix for custom upgrade streams

line 199: in case of custom upgrade streams, variable $signature contains the last value from the foreach cycle at line 130, not the core schema signature!

line 209: if we do not insert schema signatures for each custom stream, after install osTicket thinks it needs an upgrade and gets stuck (see function isUpgradePending() in class.ticket)
parent d6970162
No related branches found
No related tags found
No related merge requests found
...@@ -196,7 +196,7 @@ class Installer extends SetupWizard { ...@@ -196,7 +196,7 @@ class Installer extends SetupWizard {
'alert_email_id'=>$alert_email_id, 'default_dept_id'=>$dept_id_1, 'default_sla_id'=>$sla_id_1, 'alert_email_id'=>$alert_email_id, 'default_dept_id'=>$dept_id_1, 'default_sla_id'=>$sla_id_1,
'default_timezone_id'=>$eastern_timezone, 'default_template_id'=>$template_id_1, 'default_timezone_id'=>$eastern_timezone, 'default_template_id'=>$template_id_1,
'admin_email'=>db_input($vars['admin_email']), 'admin_email'=>db_input($vars['admin_email']),
'schema_signature'=>db_input($signature), 'schema_signature'=>db_input($streams['core']),
'helpdesk_url'=>db_input(URL), 'helpdesk_url'=>db_input(URL),
'helpdesk_title'=>db_input($vars['name'])); 'helpdesk_title'=>db_input($vars['name']));
foreach ($defaults as $key=>$value) { foreach ($defaults as $key=>$value) {
...@@ -205,6 +205,16 @@ class Installer extends SetupWizard { ...@@ -205,6 +205,16 @@ class Installer extends SetupWizard {
if(!db_query($sql, false)) if(!db_query($sql, false))
$this->errors['err']='Unable to create config settings (#7)'; $this->errors['err']='Unable to create config settings (#7)';
} }
foreach($streams as $stream=>$signature){
if($stream!='core'){
$sql='INSERT INTO '.PREFIX.'config (`namespace`, `key`, `value`, `updated`) '
.'VALUES ('.db_input($stream).', '.db_input('schema_signature')
.', '.db_input($signature).', NOW())';
if(!db_query($sql, false))
$this->errors['err']='Unable to create config settings (#7)';
}
}
} }
if($this->errors) return false; //Abort on internal errors. if($this->errors) return false; //Abort on internal errors.
......
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