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

Fix email filter -> canned response reference

parent c51bffe5
No related branches found
No related tags found
No related merge requests found
......@@ -401,7 +401,7 @@ class Filter {
',reject_email='.db_input(isset($vars['reject_email'])?1:0).
',use_replyto_email='.db_input(isset($vars['use_replyto_email'])?1:0).
',disable_autoresponder='.db_input(isset($vars['disable_autoresponder'])?1:0).
',canned_response_id='.db_input($vars['canned_response']).
',canned_response_id='.db_input($vars['canned_response_id']).
',notes='.db_input($vars['notes']);
......
......@@ -186,14 +186,15 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
Canned Response:
</td>
<td>
<select name="canned_response">
<select name="canned_response_id">
<option value="">&mdash; None &mdash;</option>
<?php
$sql='SELECT canned_id,title FROM '.CANNED_TABLE.' ORDER by title';
$sql='SELECT canned_id,title FROM '.CANNED_TABLE
.' WHERE isenabled ORDER by title';
if ($res=db_query($sql)) {
while (list($id,$title)=db_fetch_row($res)) {
$selected=($info['canned_response'] &&
$id==$info['canned_response'])
$selected=($info['canned_response_id'] &&
$id==$info['canned_response_id'])
? 'selected="selected"' : '';
echo sprintf('<option value="%d" %s>%s</option>',
$id, $selected, $title);
......@@ -201,7 +202,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
}
?>
</select>
<em>(Automatically respond with this canned attachment)</em>
<em>(Automatically respond with this canned response)</em>
</td>
</tr>
<tr>
......
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