mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
system/MessageToken_model and system/PersonLog_model models now extend DB_Model
This commit is contained in:
@@ -1,27 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This model was implemented to let to operate with messages
|
||||
* without authentication. It's ugly but useful.
|
||||
*/
|
||||
class MessageToken_model extends CI_Model
|
||||
class MessageToken_model extends DB_Model
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
* NOTE: here are loaded libs, models, helpers, etc. because MessageToken_model extends directly the CI_Model
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Loads config file message
|
||||
// Loads message configuration
|
||||
$this->config->load('message');
|
||||
|
||||
// Load return message helper
|
||||
$this->load->helper('hlp_message');
|
||||
|
||||
// Loads the database object
|
||||
$this->load->database();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* PersonLog Extends from CI_Model instead of DB_Model
|
||||
* to be able to write Log without a loggedin User!
|
||||
*/
|
||||
class PersonLog_model extends CI_Model
|
||||
{
|
||||
private $dbTable;
|
||||
|
||||
class PersonLog_model extends DB_Model
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->database();
|
||||
|
||||
$this->dbTable = 'system.tbl_log';
|
||||
}
|
||||
@@ -91,7 +85,7 @@ class PersonLog_model extends CI_Model
|
||||
$this->db->order_by('zeitpunkt', 'DESC');
|
||||
$this->db->order_by('log_id', 'DESC');
|
||||
|
||||
$where = "logtype_kurzbz = 'Processstate'
|
||||
$where = "logtype_kurzbz = 'Processstate'
|
||||
AND person_id=".$this->db->escape($person_id)."
|
||||
AND zeitpunkt >= now()";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user