From 0afb3cadff615f1fe3f15e40c020820747cca4c8 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Wed, 18 Sep 2013 10:15:57 -0500
Subject: [PATCH] Show correct description for template edits

---
 include/staff/tpl.inc.php | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/staff/tpl.inc.php b/include/staff/tpl.inc.php
index c5954090d..dbc58fc86 100644
--- a/include/staff/tpl.inc.php
+++ b/include/staff/tpl.inc.php
@@ -29,8 +29,7 @@ if (is_a($template, EmailTemplateGroup)) {
     $msgtemplates=$template->getGroup()->all_names;
     $info=array_merge(array('subj'=>$template->getSubject(), 'body'=>$template->getBody()),$info);
 }
-$info['tpl']=($info['tpl'] && $msgtemplates[$info['tpl']])?$info['tpl']:'ticket.autoresp';
-$tpl=$msgtemplates[$info['tpl']];
+$tpl=$msgtemplates[$selected];
 
 ?>
 <h2>Email Template Message - <span><?php echo $name; ?></span></h2>
@@ -72,7 +71,7 @@ $tpl=$msgtemplates[$info['tpl']];
    <thead>
      <tr>
         <th colspan="2">
-            <h4><?php echo Format::htmlchars($tpl['desc']); ?></h4>
+            <h4><?php echo Format::htmlchars($nfo['desc']); ?></h4>
             <em>Subject and body required.  <a class="tip" href="ticket_variables.txt">Supported Variables</a>.</em>
         </th>
      </tr>
-- 
GitLab