mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
- Added method chkRights to DB_Model
- Added method toPhp to DB_Model to convert array and boolean types from PostgresSQL to php - Added method execQuery to DB_Model to execute a query (it calls toPhp) - Added method pgsqlArrayToPhpArray to convert a pgsql array to php - Updated DB_Model methods to using chkRights (and toPhp where it is needed) - Removed methods escapeArray and _pgsqlArrayToPhpArray from controller APIv1_Controller - Removed escapeArray from controllers Dokumentstudiengang and Dokument - Updated models to use execQuery (and chkRights where it is needed)
This commit is contained in:
@@ -14,20 +14,14 @@ class Orgform_model extends DB_Model
|
||||
|
||||
public function getOrgformLV()
|
||||
{
|
||||
// Checks if the operation is permitted by the API caller
|
||||
if (($chkRights = $this->isEntitled($this->dbTable, PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true)
|
||||
return $chkRights;
|
||||
// Checks rights
|
||||
if ($chkRights = $this->chkRights(PermissionLib::SELECT_RIGHT)) return $chkRights;
|
||||
|
||||
$query = "SELECT *
|
||||
FROM bis.tbl_orgform
|
||||
WHERE orgform_kurzbz NOT IN ('VBB', 'ZGS')
|
||||
ORDER BY orgform_kurzbz";
|
||||
|
||||
$result = $this->db->query($query);
|
||||
|
||||
if (is_object($result))
|
||||
return success($result->result());
|
||||
else
|
||||
return error($this->db->error(), FHC_DB_ERROR);
|
||||
return $this->execQuery($query);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user