mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-18 20:49:27 +00:00
- Added new permission to access to tbl_studiengang table using basis/studiengang
- Added method getStudiengang to class Studiengang2 to get a studiengang from pk - Added method addDistinct to class DB_Model to add the distinct clause to a query
This commit is contained in:
@@ -24,6 +24,8 @@ $config['fhc_acl'] = array
|
||||
'public.tbl_prestudent' => 'basis/person',
|
||||
'public.tbl_prestudentstatus' => 'basis/person',
|
||||
'public.tbl_organisationseinheit' => 'basis/organisationseinheit',
|
||||
'public.tbl_studiengang' => 'basis/studiengang',
|
||||
|
||||
'public.tbl_sprache' => 'admin',
|
||||
'public.tbl_msg_thread' => 'admin',
|
||||
'public.tbl_msg_message' => 'admin'
|
||||
|
||||
@@ -27,6 +27,22 @@ class Studiengang2 extends APIv1_Controller
|
||||
$this->StudiengangModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
public function getStudiengang()
|
||||
{
|
||||
$studiengang_kz = $this->get('studiengang_kz');
|
||||
|
||||
if(isset($studiengang_kz))
|
||||
{
|
||||
$result = $this->StudiengangModel->load($studiengang_kz);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
public function getAllForBewerbung()
|
||||
{
|
||||
$this->response($this->StudiengangModel->getAllForBewerbung(), REST_Controller::HTTP_OK);
|
||||
|
||||
@@ -224,6 +224,16 @@ class DB_Model extends FHC_Model
|
||||
return $this->_success(TRUE);
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Add distinct clause
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addDistinct()
|
||||
{
|
||||
$this->db->distinct();
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Add limit clause
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user