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

Indicate which filters are using a canned reply

parent 39230eab
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,11 @@ if($canned && $_REQUEST['a']!='add'){
$info=$canned->getInfo();
$info['id']=$canned->getId();
$qstr.='&id='.$canned->getId();
$res = db_query(
'SELECT GROUP_CONCAT(DISTINCT name ORDER BY name SEPARATOR ", ")'
.' FROM '.EMAIL_FILTER_TABLE
.' WHERE canned_response_id = '.db_input($canned->getId()));
$info['filter'] = ($res && ($row = db_fetch_row($res))) ? $row[0] : null;
}else {
$title='Add New Canned Reply';
$action='create';
......@@ -107,6 +112,11 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
</tr>
</tbody>
</table>
<?php if ($info['filter']) { ?>
<br/>
<div id="msg_warning">Canned reply is in use by email filter(s): <?php
echo $info['filter']; ?></div>
<?php } ?>
<p style="padding-left:225px;">
<input type="submit" name="submit" value="<?php echo $submit_text; ?>">
<input type="reset" name="reset" value="Reset">
......
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