mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
BugFix show PreStudent Variables instead of Person Variables in Msg
This commit is contained in:
@@ -57,9 +57,10 @@ class Messages extends Auth_Controller
|
||||
$subject = $this->input->post('subject');
|
||||
$body = $this->input->post('body');
|
||||
$persons = $this->input->post('persons');
|
||||
$prestudenten = $this->input->post('prestudenten');
|
||||
$relationmessage_id = $this->input->post('relationmessage_id');
|
||||
|
||||
$sendImplicitTemplate = $this->CLMessagesModel->sendImplicitTemplate($persons, $subject, $body, $relationmessage_id);
|
||||
$sendImplicitTemplate = $this->CLMessagesModel->sendImplicitTemplate($prestudenten, $subject, $body, $relationmessage_id);
|
||||
if (isSuccess($sendImplicitTemplate))
|
||||
{
|
||||
$this->load->view('system/messages/htmlSuccess');
|
||||
|
||||
@@ -337,7 +337,7 @@ class Messages_model extends CI_Model
|
||||
if (!is_numeric($sender_id)) show_error('The current logged user person_id is not defined');
|
||||
|
||||
// Retrieves message vars data for the given user/s
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPersonId($persons);
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPrestudentId($persons);
|
||||
if (isError($msgVarsData)) show_error(getError($msgVarsData));
|
||||
if (!hasData($msgVarsData)) show_error('No recipients were given');
|
||||
|
||||
@@ -684,6 +684,7 @@ class Messages_model extends CI_Model
|
||||
$recipientsArray = array();
|
||||
$recipientsList = '';
|
||||
$persons = '';
|
||||
$prestudenten = '';
|
||||
foreach (getData($info) as $receiver)
|
||||
{
|
||||
$recipient = new stdClass();
|
||||
@@ -702,6 +703,7 @@ class Messages_model extends CI_Model
|
||||
$recipientsArray[] = $recipient;
|
||||
$recipientsList .= $receiver->Vorname.' '.$receiver->Nachname.'; ';
|
||||
$persons .= '<input type="hidden" name="persons[]" value="'.$receiver->person_id.'">'."\n";
|
||||
$prestudenten .= '<input type="hidden" name="prestudenten[]" value="'.$receiver->prestudent_id.'">'."\n";
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
@@ -779,6 +781,7 @@ class Messages_model extends CI_Model
|
||||
'senderIsAdmin' => getData($senderIsAdmin),
|
||||
'recipientsArray' => $recipientsArray,
|
||||
'persons' => $persons,
|
||||
'prestudenten' => $prestudenten,
|
||||
'relationmessage_id' => $relationmessage,
|
||||
'type' => $type
|
||||
);
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
</div>
|
||||
|
||||
<?php echo $persons; ?>
|
||||
<?php echo $prestudenten; ?>
|
||||
<?php echo $relationmessage_id; ?>
|
||||
<?php echo $type; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user