mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
enabled sending messages with person ids as receivers, person data can be retrieved by uid, link in infocenter details to send message
This commit is contained in:
@@ -102,6 +102,23 @@ class Message_model extends DB_Model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* getMessageVars for person
|
||||
*/
|
||||
public function getMessageVarsPerson()
|
||||
{
|
||||
$result = $this->db->query('SELECT * FROM public.vw_msg_vars_person WHERE 0 = 1');
|
||||
|
||||
if ($result)
|
||||
{
|
||||
return success($result->list_fields());
|
||||
}
|
||||
else
|
||||
{
|
||||
return error($this->db->error(), FHC_DB_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* getMsgVarsDataByPrestudentId
|
||||
*/
|
||||
@@ -111,4 +128,14 @@ class Message_model extends DB_Model
|
||||
|
||||
return $this->execQuery(sprintf($query, is_array($prestudent_id) ? 'IN' : '='), array($prestudent_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* getMsgVarsDataByPersonId
|
||||
*/
|
||||
public function getMsgVarsDataByPersonId($person_id)
|
||||
{
|
||||
$query = 'SELECT * FROM public.vw_msg_vars_person WHERE person_id %s ?';
|
||||
|
||||
return $this->execQuery(sprintf($query, is_array($person_id) ? 'IN' : '='), array($person_id));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user