- Bug fix in MessageLib

- Now is possible to send a message to more recipients from FAS
- Can be used the variables substitution from FAS
This commit is contained in:
bison-paolo
2017-03-02 15:47:17 +01:00
parent d8bb1ae500
commit e7be37708d
5 changed files with 253 additions and 32 deletions
@@ -66,4 +66,31 @@ class Message_model extends DB_Model
return $this->execQuery($sql, $parametersArray);
}
/**
*
*/
public function getMessageVars()
{
$result = $this->db->query('SELECT * FROM public.vw_msg_vars WHERE 0 = 1');
if ($result)
{
return success($result->list_fields());
}
else
{
return error($this->db->error(), FHC_DB_ERROR);
}
}
/**
*
*/
public function getMsgVarsData($prestudent_id)
{
$query = 'SELECT * FROM public.vw_msg_vars WHERE prestudent_id %s ?';
return $this->execQuery(sprintf($query, is_array($prestudent_id) ? 'IN' : '='), array($prestudent_id));
}
}