mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
- Moved class APIv1_Controller from FHC_Controller.php to APIv1_Controller.php
- Moved class DB_Model from FHC_Model.php to DB_Model.php - load method of class person (person.class.php) now is calling getPerson method of the class Person_model - getAllForBewerbung method of class studiengang (studiengang.class.php) now is calling getAllForBewerbung method of the class Studiengang_model - getStudienplaene method of class studienplan (studienplan.class.php) now is calling getStudienplaene method of the class Studienplan_model
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
class DB_Model extends FHC_Model
|
||||
{
|
||||
protected $dbTable = NULL; // Name of the DB-Table for CI-Insert, -Update, ...
|
||||
// Addon ID, stored to let to check the permissions
|
||||
private $_addonID;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->database();
|
||||
$this->lang->load('fhc_db');
|
||||
}
|
||||
|
||||
public function insert($data)
|
||||
{
|
||||
if(!is_null($this->dbTable))
|
||||
{
|
||||
$this->db->insert($this->dbTable, $data);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Invalid ID
|
||||
*
|
||||
* @param integer config.php error code numbers
|
||||
* @return array
|
||||
*/
|
||||
protected function _invalid_id($error = '')
|
||||
{
|
||||
return array(
|
||||
'err' => 1,
|
||||
'code' => $error,
|
||||
'msg' => lang('fhc_' . $error)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method setAddonID
|
||||
*
|
||||
* @param $addonID
|
||||
* @return void
|
||||
*/
|
||||
public function setAddonID($addonID)
|
||||
{
|
||||
$this->_addonID = $addonID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method getAddonID
|
||||
*
|
||||
* @return string _addonID
|
||||
*/
|
||||
public function getAddonID()
|
||||
{
|
||||
return $this->_addonID;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user