mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 23:42:17 +00:00
- Removed messagelink from controller system/infocenter/InfoCenter.php
- Improved MessageLib - Added method getMessageVarsPerson to MessageLib - Moved JS from views/system/messageWrite.php to public/js/messaging/messageWrite.js - Added new controller controllers/system/FASMessages.php - Adapted content/fasoverlay.js.php and content/messages.js.php to use FASMessages
This commit is contained in:
@@ -39,6 +39,9 @@ class MessageLib
|
||||
$this->ci->lang->load('message');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* getMessage() - returns the specified received message for a specified person
|
||||
*/
|
||||
@@ -750,7 +753,37 @@ class MessageLib
|
||||
return $sent;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/**
|
||||
* parseMessageText
|
||||
*/
|
||||
public function parseMessageText($text, $data = array())
|
||||
{
|
||||
return $this->ci->parser->parse_string($text, $data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets data for Person from view vw_msg_vars_person
|
||||
* @param $person_id
|
||||
*/
|
||||
public function getMessageVarsPerson()
|
||||
{
|
||||
$variablesArray = array();
|
||||
$variables = $this->ci->MessageModel->getMessageVarsPerson();
|
||||
|
||||
if (hasData($variables))
|
||||
{
|
||||
// Skip person_id
|
||||
for ($i = 1; $i < count($variables->retval); $i++)
|
||||
{
|
||||
$variablesArray['{'.str_replace(' ', '_', strtolower($variables->retval[$i])).'}'] = $variables->retval[$i];
|
||||
}
|
||||
array_shift($variables->retval); // Remove person_id
|
||||
}
|
||||
|
||||
return $variablesArray;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
@@ -932,12 +965,4 @@ class MessageLib
|
||||
{
|
||||
return success($retval, $code, MessageLib::MSG_INDX_PREFIX);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function parseMessageText($text, $data = array())
|
||||
{
|
||||
return $this->ci->parser->parse_string($text, $data, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user