mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-14 10:39:27 +00:00
- Added method setReadMessageStatusByToken to MessageToken_model
- Now the method toHTML of the controller ViewMessage is calling also the method setReadMessageStatusByToken of model MessageToken_model
This commit is contained in:
@@ -30,6 +30,10 @@ class ViewMessage extends CI_Controller
|
||||
$this->load->model('system/MessageToken_model', 'MessageTokenModel');
|
||||
}
|
||||
|
||||
/**
|
||||
* Using the MessageTokenModel instead of MessageLib to allow
|
||||
* viewing the message without prompting the login
|
||||
*/
|
||||
public function toHTML($token)
|
||||
{
|
||||
$msg = $this->MessageTokenModel->getMessageByToken($token);
|
||||
@@ -41,6 +45,13 @@ class ViewMessage extends CI_Controller
|
||||
|
||||
if (is_array($msg->retval) && count($msg->retval) > 0)
|
||||
{
|
||||
$setReadMessageStatusByToken = $this->MessageTokenModel->setReadMessageStatusByToken($token);
|
||||
|
||||
if (isError($setReadMessageStatusByToken))
|
||||
{
|
||||
show_error($msg->$setReadMessageStatusByToken);
|
||||
}
|
||||
|
||||
$data = array (
|
||||
'message' => $msg->retval[0],
|
||||
'href' => APP_ROOT . $this->config->item('redirect_view_message_url') . $token
|
||||
|
||||
Reference in New Issue
Block a user