Files
FHC-Core/application/models/codex/Orgform_model.php
T
bison-paolo 8e0ca12deb - All permission functionalities now are in the library PermissionLib
- All return messages functions are in the message helper and it is loaded by the core classes
- Added the missing constant FHC_NOPK
- Updated all the interested classes with the new permission method
- Updated all the interested classes with the new return message functions
2016-10-13 17:53:12 +02:00

33 lines
747 B
PHP

<?php
class Orgform_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_orgform';
$this->pk = 'orgform_kurzbz';
}
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;
$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);
}
}