mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
9a4f5480c4
- The function getAuthUID() present in the helper fhcauth_helper.php now tries to work always with CI session to get the uid - REST_controller doesn't need anymore to handle the uid - FHC_Controller and FHC_Model load fhcauth_helper in their constructor, so any class that extends them now could call the function getAuthUID() anywhere in the code - The controllers don't need anymore to pass the uid to the models or to the libraries - Library FHC_DB_ACL load fhcauth_helper in its constructor and uses getAuthID()
41 lines
832 B
PHP
41 lines
832 B
PHP
<?php
|
|
|
|
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
class FHC_Model extends CI_Model
|
|
{
|
|
function __construct()
|
|
{
|
|
parent::__construct();
|
|
|
|
$this->lang->load('fhc_model');
|
|
$this->lang->load('fhcomplete');
|
|
|
|
$this->load->helper('language');
|
|
$this->load->helper('Message');
|
|
$this->load->helper('fhcauth');
|
|
|
|
$this->load->library('FHC_DB_ACL');
|
|
}
|
|
|
|
/** ---------------------------------------------------------------
|
|
* Success
|
|
*
|
|
* @param mixed $retval
|
|
* @return array
|
|
*/
|
|
protected function _success($retval, $message = null)
|
|
{
|
|
return success($retval, $message);
|
|
}
|
|
|
|
/** ---------------------------------------------------------------
|
|
* General Error
|
|
*
|
|
* @return array
|
|
*/
|
|
protected function _error($retval, $message = null)
|
|
{
|
|
return error($retval, $message);
|
|
}
|
|
} |