mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
Merge branch 'master' into permissions
- Added new core controller called Auth_Controller that extends FHC_Controller and manage the authentication - All the controllers that were extending the CI_Controller now they extend the FHC_Controller - All the controllers that were extending the FHC_Controller now they extend the Auth_Controller - Added the method isAllowed to the FiltersLib to check if the authenticated user has the required permissions - FilterWidget and controller Filters are using the method isAllowed from the FiltersLib
This commit is contained in:
@@ -80,4 +80,36 @@ class PersonLog_model extends CI_Model
|
||||
|
||||
return success($result->result());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all logs with zeitpunkt > today
|
||||
* @param $person_id
|
||||
* @return array
|
||||
*/
|
||||
public function getLogsInFuture($person_id)
|
||||
{
|
||||
$this->db->order_by('zeitpunkt', 'DESC');
|
||||
$this->db->order_by('log_id', 'DESC');
|
||||
|
||||
$where = "logtype_kurzbz = 'Processstate'
|
||||
AND person_id=".$this->db->escape($person_id)."
|
||||
AND zeitpunkt >= now()";
|
||||
|
||||
$result = $this->db->get_where($this->dbTable, $where);
|
||||
|
||||
return success($result->result());
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a log
|
||||
* @param $log_id
|
||||
* @return array
|
||||
*/
|
||||
public function deleteLog($log_id)
|
||||
{
|
||||
$this->db->where('log_id', $log_id);
|
||||
$result = $this->db->delete($this->dbTable);
|
||||
|
||||
return success($result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user