mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
- application/core/* -> CS compliant
- application/libraries/* -> CS compliant - FHC_Model isEntitled method now return error() or success() - Updated all code that uses isEntitled method from FHC_Model - Removed Squiz.PHP.DisallowSizeFunctionsInLoops from CS ruleset - Removed depracated method replace from DB_Model - Removed unused method pgArrayPhp from DB_Model - Renamed method arrayMergeIndex to _arrayCombine in DB_Model and set as private - Added method _manageUDFs to DB_Model (a wrapper for UDFLib->manageUDFs)
This commit is contained in:
@@ -20,12 +20,12 @@ class Message_model extends DB_Model
|
||||
public function getMessagesByPerson($person_id, $all)
|
||||
{
|
||||
// Checks if the operation is permitted by the API caller
|
||||
if (($isEntitled = $this->isEntitled('public.tbl_msg_message', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true)
|
||||
return $isEntitled;
|
||||
if (($isEntitled = $this->isEntitled('public.tbl_person', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true)
|
||||
return $isEntitled;
|
||||
if (($isEntitled = $this->isEntitled('public.tbl_msg_status', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true)
|
||||
return $isEntitled;
|
||||
if (isError($ent = $this->isEntitled('public.tbl_person', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)))
|
||||
return $ent;
|
||||
if (isError($ent = $this->isEntitled('public.tbl_msg_status', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)))
|
||||
return $ent;
|
||||
if (isError($ent = $this->isEntitled('public.tbl_msg_message', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)))
|
||||
return $ent;
|
||||
|
||||
$sql = 'SELECT m.message_id,
|
||||
m.person_id,
|
||||
@@ -68,7 +68,7 @@ class Message_model extends DB_Model
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* getMessageVars
|
||||
*/
|
||||
public function getMessageVars()
|
||||
{
|
||||
@@ -85,7 +85,7 @@ class Message_model extends DB_Model
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* getMsgVarsDataByPrestudentId
|
||||
*/
|
||||
public function getMsgVarsDataByPrestudentId($prestudent_id)
|
||||
{
|
||||
@@ -93,4 +93,4 @@ class Message_model extends DB_Model
|
||||
|
||||
return $this->execQuery(sprintf($query, is_array($prestudent_id) ? 'IN' : '='), array($prestudent_id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user