mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 01:42:17 +00:00
Merge branch 'ci' of https://github.com/FH-Complete/FHC-Core into ci
Conflicts: application/core/FHC_Model.php
This commit is contained in:
@@ -8,12 +8,12 @@ class DB_Model extends FHC_Model
|
||||
// True if this table has a primary key that uses a sequence
|
||||
protected $acl; // Name of the PrimaryKey for DB-Update, Load, ...
|
||||
|
||||
function __construct($dbTable = null, $pk = null)
|
||||
function __construct($dbTable = null, $pk = null, $hasSequence = true)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = $dbTable;
|
||||
$this->pk = $pk;
|
||||
$this->hasSequence = true;
|
||||
$this->hasSequence = $hasSequence;
|
||||
$this->load->database();
|
||||
$this->acl = $this->config->item('fhc_acl');
|
||||
}
|
||||
@@ -427,4 +427,4 @@ class DB_Model extends FHC_Model
|
||||
'msg' => lang('fhc_' . $error)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,12 @@ class FHC_Model extends CI_Model
|
||||
// Get UID from the environment (HTTP authentication via authentication.class.php)
|
||||
elseif(isset($_SERVER['PHP_AUTH_USER']))
|
||||
$uid = $_SERVER['PHP_AUTH_USER'];
|
||||
|
||||
// After getting UID for the first time, it saves it in CI session
|
||||
if (isset($uid) && !isset($this->session->uid))
|
||||
{
|
||||
$this->session->uid = $uid;
|
||||
}
|
||||
|
||||
$this->load->library('FHC_DB_ACL', array('uid' => $uid));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user