mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
- Added new library ReihungstestLib
- Added method isEntitled to FCH_Model - Cleaned the controllers by moving the database related code in the models or libraries
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
if (! defined("BASEPATH")) exit("No direct script access allowed");
|
||||
|
||||
class FHC_Model extends CI_Model
|
||||
{
|
||||
@@ -10,16 +10,16 @@ class FHC_Model extends CI_Model
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->lang->load('fhc_model');
|
||||
$this->lang->load('fhcomplete');
|
||||
$this->lang->load("fhc_model");
|
||||
$this->lang->load("fhcomplete");
|
||||
|
||||
$this->load->helper('language');
|
||||
$this->load->helper('Message');
|
||||
$this->load->helper('fhcauth');
|
||||
$this->load->helper("language");
|
||||
$this->load->helper("Message");
|
||||
$this->load->helper("fhcauth");
|
||||
|
||||
$this->load->library('FHC_DB_ACL');
|
||||
$this->load->library("FHC_DB_ACL");
|
||||
|
||||
$this->acl = $this->config->item('fhc_acl');
|
||||
$this->acl = $this->config->item("fhc_acl");
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
@@ -54,4 +54,18 @@ class FHC_Model extends CI_Model
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected function isEntitled($sourceName, $accessType, $languageMessageCode, $msgErrorCode)
|
||||
{
|
||||
$fhc_acl = $this->getBerechtigungKurzbz($sourceName);
|
||||
|
||||
if (! $this->fhc_db_acl->isBerechtigt($fhc_acl, $accessType))
|
||||
{
|
||||
return $this->_error(lang("fhc_" . $languageMessageCode)." -> " . $fhc_acl . ":" . $accessType, $msgErrorCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user