mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 23:42:17 +00:00
- Renamed view system/messages/messageSent.php to system/messages/htmlSuccess.php
- Added new view system/messages/htmlError.php - Renamed view system/messages/messageWrite.php to system/messages/htmlWriteTemplate.php - Added new widget views: widgets/Dropdown_widget.php and widgets/MultipleDropdown_widget.php - Added new CSS public/css/Widgets.css - Controller system/FASMessages: - Renamed method write to writeTemplate and method writeReply to writeReplyTemplate - Removed all the private methods and moved all the logic to model CL/Messages_model - Methods writeTemplate and writeReplyTemplate do not need anymore the sender id as parameter - Controller system/Messages: - Renamed method write to writeTemplate - Renamed method send to sendImplicitTemplate - Renamed method sendJson to sendExplicitTemplateJson - Moved all the logic to model CL/Messages_model - Adapted php and JS code to use these new methods names and interfaces - Removed public method getIsAdmin from MessageLib - Method _sendMessage of MessageLib now returns the saved message ids - Added new package olifolkerd/tabulator to composer - Added new parameter widgets to view templates/FHC-Header.php - Added new HTML widget widgets/Dropdown_widget and widgets/MultipleDropdown_widget - Added constants REPLY_SUBJECT_PREFIX and REPLY_BODY_PREFIX to model CL/Messages_model - Added new public methods prepareHtmlWriteTemplatePersons, prepareHtmlWriteTemplatePrestudents, sendImplicitTemplate, sendExplicitTemplate, getVorlage, parseMessageText and getMessageFromIds to model CL/Messages_model - Added new private methods _getAuthUser, _lowerReplaceSpaceArrayKeys, _addOeToPrestudents, _personLog and _prepareHtmlWriteTemplate to model CL/Messages_model
This commit is contained in:
@@ -49,7 +49,6 @@ class MessageLib
|
||||
|
||||
// Loads extra models
|
||||
$this->_ci->load->model('person/Person_model', 'PersonModel');
|
||||
$this->_ci->load->model('system/Benutzerrolle_model', 'BenutzerrolleModel');
|
||||
$this->_ci->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||
$this->_ci->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
|
||||
}
|
||||
@@ -208,14 +207,6 @@ class MessageLib
|
||||
return $benutzer; // otherwise returns the error
|
||||
}
|
||||
|
||||
/**
|
||||
* Admin or commoner?
|
||||
*/
|
||||
public function getIsAdmin($sender_id)
|
||||
{
|
||||
return $this->_ci->BenutzerrolleModel->isAdminByPersonId($sender_id);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods used by REST API
|
||||
|
||||
@@ -629,6 +620,7 @@ class MessageLib
|
||||
|
||||
/**
|
||||
* Sends new message core method, may be wrapped by other methods.
|
||||
* If success then returns an array of successfully saved message ids
|
||||
*/
|
||||
private function _sendMessage(
|
||||
$receivers, $receiversOU, $subject, $body, $sender_id, $senderOU, $relationmessage_id, $priority, $multiPartMime
|
||||
@@ -658,11 +650,7 @@ class MessageLib
|
||||
);
|
||||
if (isSuccess($saveMessageResult)) // If successfully saved
|
||||
{
|
||||
// If the system is configured to send messages immediately
|
||||
if ($this->_ci->config->item(self::CFG_SEND_IMMEDIATELY) === true)
|
||||
{
|
||||
$savedMessages[] = getData($saveMessageResult); // store the message id of the saved message
|
||||
}
|
||||
$savedMessages[] = getData($saveMessageResult); // store the message id of the saved message
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -683,7 +671,7 @@ class MessageLib
|
||||
}
|
||||
}
|
||||
|
||||
return success('Message sent successfully');
|
||||
return success($savedMessages);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user