Fix fatal error, fix email sending.

1.10.x
Julio Montoya 10 years ago
parent c603b31052
commit 304a32b0d1
  1. 15
      plugin/ticket/src/ticket.class.php
  2. 6
      plugin/ticket/src/ticket_details.php

@ -194,6 +194,8 @@ class TicketManager
<td width="400px">' . $content . '</td> <td width="400px">' . $content . '</td>
</tr> </tr>
</table>'; </table>';
// Send email to "other area" email
api_mail_html( api_mail_html(
$plugin->get_lang('VirtualSupport'), $plugin->get_lang('VirtualSupport'),
$email, $email,
@ -204,6 +206,19 @@ class TicketManager
array(), array(),
$data_files $data_files
); );
// Send email to user
api_mail_html(
$plugin->get_lang('VirtualSupport'),
$user['email'],
$plugin->get_lang('IncidentResentToVirtualSupport'),
$helpDeskMessage,
$user['firstname'].' '.$user['lastname'],
$personalEmail,
array(),
$data_files
);
$studentMessage = sprintf($plugin->get_lang('YourQuestionWasSentToTheResponableAreaX'), $email, $email); $studentMessage = sprintf($plugin->get_lang('YourQuestionWasSentToTheResponableAreaX'), $email, $email);
$studentMessage .= sprintf($plugin->get_lang('YourAnswerToTheQuestionWillBeSentToX'), $personalEmail); $studentMessage .= sprintf($plugin->get_lang('YourAnswerToTheQuestionWillBeSentToX'), $personalEmail);
self::insert_message( self::insert_message(

@ -368,6 +368,9 @@ if (!isset($_POST['compose'])) {
} }
} }
} }
Display::display_footer();
} else { } else {
$ticket_id = $_POST['ticket_id']; $ticket_id = $_POST['ticket_id'];
$content = $_POST['content']; $content = $_POST['content'];
@ -377,6 +380,7 @@ if (!isset($_POST['compose'])) {
$user_id = api_get_user_id(); $user_id = api_get_user_id();
TicketManager::insert_message($ticket_id, $subject, $content, $file_attachments, $user_id, 'NOL', $mensajeconfirmacion); TicketManager::insert_message($ticket_id, $subject, $content, $file_attachments, $user_id, 'NOL', $mensajeconfirmacion);
header("location:" . api_get_self() . "?ticket_id=" . $ticket_id); header("location:" . api_get_self() . "?ticket_id=" . $ticket_id);
exit;
} }
function show_form_send_message() function show_form_send_message()
@ -459,5 +463,3 @@ function show_form_send_message()
$form->display(); $form->display();
} }
Display::display_footer();

Loading…
Cancel
Save