- Modified MessageLib constructor to allow to give the parameter UID from a Controller

- Controller Message now works with MessageLib
- Added getMessagesByPersonID method to controller Message
- Added permissions basis/message and fs/system to dump.sql
This commit is contained in:
paolo
2016-06-21 15:07:51 +02:00
parent 6e62fbdcd4
commit 5a5472257a
4 changed files with 53 additions and 37 deletions
+6 -1
View File
@@ -11,13 +11,18 @@ class MessageLib
{
private $recipients = array();
public function __construct()
public function __construct($params)
{
require_once APPPATH.'config/message.php';
$this->ci =& get_instance();
//$this->ci->load->model('person/Person_model', 'PersonModel');
$this->ci->load->model('system/Message_model', 'MessageModel');
if (is_array($params) && isset($params['uid']))
{
$this->ci->MessageModel->setUID($params['uid']);
}
$this->ci->load->model('system/MsgStatus_model', 'MsgStatusModel');
$this->ci->load->model('system/Recipient_model', 'RecipientModel');
$this->ci->load->model('system/Attachment_model', 'AttachmentModel');