. if (!defined('EG')) die('Direct access not allowed!'); class BaseModel extends Model_Tree { public function updateHistory($type) { $clean['created_by'] = (int)$this->values['created_by']; $clean['last_id'] = (int)$this->lastId(); $history = new HistoryModel(); $history->values = array( 'created_by' => $clean['created_by'], 'type' => sanitizeAll($type), 'action' => "insert", 'id' => $clean['last_id'], 'message' => '', 'gr' => 'registered', ); $history->insert(); } }