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:
Paolo
2018-06-08 17:53:12 +02:00
109 changed files with 9580 additions and 4707 deletions
@@ -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);
}
}