mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 00:24:35 +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:
@@ -21,7 +21,9 @@ class Geschaeftsjahr_model extends DB_Model
|
||||
$query = 'SELECT *
|
||||
FROM public.tbl_geschaeftsjahr
|
||||
WHERE start <= now()
|
||||
AND ende >= now()';
|
||||
AND ende >= now()
|
||||
ORDER BY start DESC
|
||||
LIMIT 1';
|
||||
|
||||
return $this->execQuery($query);
|
||||
}
|
||||
|
||||
@@ -12,4 +12,21 @@ class Studienjahr_model extends DB_Model
|
||||
$this->pk = 'studienjahr_kurzbz';
|
||||
$this->hasSequence = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets current Studienjahr, as determined by its start and enddate
|
||||
* @return array|null
|
||||
*/
|
||||
public function getCurrStudienjahr()
|
||||
{
|
||||
$query = 'SELECT *
|
||||
FROM public.tbl_studienjahr
|
||||
JOIN public.tbl_studiensemester using(studienjahr_kurzbz)
|
||||
WHERE start <= now()
|
||||
AND ende >= now()
|
||||
ORDER by start DESC
|
||||
LIMIT 1';
|
||||
|
||||
return $this->execQuery($query);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user