Avoid lang validation - refs #6715

1.9.x
Francis Gonzales 11 years ago
parent 61c5f2ef8e
commit 2e5efc48c9
  1. 4
      plugin/ticket/src/ticket.class.php
  2. 2
      plugin/ticket/src/ticket_details.php

@ -288,8 +288,8 @@ class TicketManager
if ($sendConfirmation) {
$form = '<form action="ticket_details.php?ticket_id=' . $ticket_id . '" id="confirmticket" method="POST" >
<p>' . $plugin->get_lang('TicketWasThisAnswerSatisfying') . '</p>
<input id="responseyes" type="submit" value="' . get_lang('Yes') . '" name="response" />
<input id="responseno" type="submit" value="' . get_lang('No') . '" name="response" />
<button name="response" id="responseyes" value="1">' . get_lang('Yes') . '</button>
<button name="response" id="responseno" value="0">' . get_lang('No') . '</button>
</form>';
$content .= $form;
Database::query(

@ -162,7 +162,7 @@ if (!isset($_GET['ticket_id'])) {
}
if (isset($_POST['response'])) {
if ($user_id == $ticket['ticket']['request_user']) {
$response = ($_POST['response'] == get_lang('Yes')) ? true : ($_POST['response'] == get_lang('No') ? false : null);
$response = ($_POST['response'] == "1") ? true : ($_POST['response'] == "0" ? false : null);
if ($response && $ticket['ticket']['status_id'] == 'XCF') {
TicketManager::close_ticket($_GET['ticket_id'], $user_id);
$ticket['ticket']['status_id'] = 'CLS';

Loading…
Cancel
Save