From 407f42aef07d66c13faac5057b9625d3c0325918 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Thu, 21 Nov 2013 09:54:31 -0600
Subject: [PATCH] install: Fixup template install on MySQL clusters

---
 include/class.template.php                   | 2 ++
 include/i18n/en_US/email_template_group.yaml | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/class.template.php b/include/class.template.php
index 36725476b..a66a74f9c 100644
--- a/include/class.template.php
+++ b/include/class.template.php
@@ -322,6 +322,8 @@ class EmailTemplateGroup {
 
         } else {
 
+            if (isset($vars['id']))
+                $sql .= ', tpl_id='.db_input($vars['id']);
             $sql='INSERT INTO '.EMAIL_TEMPLATE_GRP_TABLE
                 .' SET created=NOW(), '.$sql;
             if(!db_query($sql) || !($new_id=db_insert_id())) {
diff --git a/include/i18n/en_US/email_template_group.yaml b/include/i18n/en_US/email_template_group.yaml
index 4a76150ff..e7ffd4261 100644
--- a/include/i18n/en_US/email_template_group.yaml
+++ b/include/i18n/en_US/email_template_group.yaml
@@ -13,7 +13,8 @@
 # notes - Administrative notes (viewable internally only)
 #
 ---
-- isactive: 1
+- id: 1
+  isactive: 1
   name: osTicket Default Template (HTML)
   notes: |
     Default osTicket templates
-- 
GitLab