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

Fix bug in EmailTemplate::lookupByName

parent bf1c4ce5
No related branches found
No related tags found
No related merge requests found
......@@ -445,8 +445,8 @@ class EmailTemplate {
return self::lookup(self::create($vars, $errors));
}
function lookupByName($tpl, $name, $group=null) {
$sql = 'SELCT id FROM '.EMAIL_TEMPLATE_TABLE
function lookupByName($tpl_id, $name, $group=null) {
$sql = 'SELECT id FROM '.EMAIL_TEMPLATE_TABLE
.' WHERE tpl_id='.db_input($tpl_id)
.' AND code_name='.db_input($name);
if (($res=db_query($sql)) && ($id=db_result($res)))
......
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