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

Fix install and initial data issues

parent 63b062d0
Branches
Tags
No related merge requests found
......@@ -355,7 +355,7 @@ class Dept {
&& (!$vars['email_id'] || !is_numeric($vars['email_id'])))
$errors['email_id']='Email selection required';
if(!is_numeric($vars['tpl_id']))
if(isset($vars['tpl_id']) && !is_numeric($vars['tpl_id']))
$errors['tpl_id']='Template selection required';
if(!$vars['name']) {
......
......@@ -141,7 +141,7 @@ class Mailer {
// the message appears to be HTML -- that is, the first
// non-whitespace char is a '<' character
if (!(isset($options['text']) && $options['text'])
&& $cfg->isHtmlThreadEnabled()) {
&& (!$cfg || $cfg->isHtmlThreadEnabled())) {
// Make sure nothing unsafe has creeped into the message
$message = Format::safe_html($message); //XXX??
$mime->setTXTBody(Format::html2text($message, 90, false));
......@@ -152,7 +152,7 @@ class Mailer {
}
$domain = 'local';
if ($isHtml && $ost->getConfig()->isHtmlThreadEnabled()) {
if ($isHtml && $cfg && $cfg->isHtmlThreadEnabled()) {
// TODO: Lookup helpdesk domain
$domain = substr(md5($ost->getConfig()->getURL()), -12);
// Format content-ids with the domain, and add the inline images
......
......@@ -261,6 +261,8 @@ class Topic {
$errors['err']='Unable to update topic. Internal error occurred';
} else {
if (isset($vars['topic_id']))
$sql .= ', topic_id='.db_input($vars['topic_id']);
$sql='INSERT INTO '.TOPIC_TABLE.' SET '.$sql.',created=NOW()';
if(db_query($sql) && ($id=db_insert_id()))
return $id;
......
......@@ -34,7 +34,7 @@
notes: |
Tickets that primarily concern the sales and billing departments
- id: 10
- topic_id: 10
isactive: 1
ispublic: 1
dept_id: 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment