diff --git a/main/inc/lib/TicketManager.php b/main/inc/lib/TicketManager.php index d7c0478153..a62ea33e65 100644 --- a/main/inc/lib/TicketManager.php +++ b/main/inc/lib/TicketManager.php @@ -251,13 +251,14 @@ class TicketManager /** * Inserts a new ticket in the corresponding tables - * @param $category_id - * @param $course_id - * @param $project_id - * @param $other_area - * @param $email - * @param $subject - * @param $content + * @param int $category_id + * @param int $course_id + * @param int $sessionId + * @param int $project_id + * @param string $other_area + * @param string $email + * @param string $subject + * @param string $content * @param string $personalEmail * @param $file_attachments * @param string $source @@ -433,8 +434,7 @@ class TicketManager '; if (empty($category_id)) { - - if (api_get_setting('ticket_send_warning_to_all_admins') == 'true') { + if (api_get_setting('ticket_send_warning_to_all_admins') === 'true') { $warningSubject = sprintf( get_lang('TicketXCreatedWithNoCategory'), $ticket_code @@ -458,7 +458,7 @@ class TicketManager $message = '
';
}
$row['col0'] = Display::return_icon(
- $img_source, get_lang('Info')
- ) . '' . $row['code'] . '';
+ $img_source,
+ get_lang('Info')
+ ).
+ '' . $row['code'] . '';
// @todo fix
/*if ($row['col7'] == 'PENDIENTE') {
$row['col7'] = '' . $row['col7'] . '';
@@ -1062,14 +1064,14 @@ class TicketManager
$name,
$row['assigned_last_user'],
$row['col7'],
- $row['col8'],
+ $row['col8']
);
} else {
$actions = '';
$row['col0'] = Display::return_icon(
- $img_source,
- get_lang('Info')
- ) . '' . $row['code'] . '';
+ $img_source,
+ get_lang('Info')
+ ) . '' . $row['code'] . '';
$now = api_strtotime(api_get_utc_datetime());
$last_edit_date = api_strtotime($row['sys_lastedit_datetime']);
$dif = $now - $last_edit_date;
@@ -1267,14 +1269,11 @@ class TicketManager
/**
* @param int $ticket_id
- * @param int $user_id
* @return array
*/
- public static function get_ticket_detail_by_id($ticket_id, $user_id)
+ public static function get_ticket_detail_by_id($ticket_id)
{
$ticket_id = intval($ticket_id);
- $user_id = intval($user_id);
-
$table_support_category = Database::get_main_table(
TABLE_TICKET_CATEGORY
);
@@ -1296,7 +1295,7 @@ class TicketManager
cat.name,
status.name as status,
priority.name priority
- FROM $table_support_tickets ticket,
+ FROM $table_support_tickets ticket,
$table_support_category cat ,
$table_support_priority priority,
$table_support_status status
@@ -1431,7 +1430,7 @@ class TicketManager
public static function sendNotification($ticketId, $userId, $title, $message)
{
$userInfo = api_get_user_info($userId);
- $ticketInfo = self::get_ticket_detail_by_id($ticketId, $userId);
+ $ticketInfo = self::get_ticket_detail_by_id($ticketId);
$requestUserInfo = $ticketInfo['usuario'];
$ticketCode = $ticketInfo['ticket']['code'];
$status = $ticketInfo['ticket']['status'];
diff --git a/main/ticket/ticket_details.php b/main/ticket/ticket_details.php
index e6bb63be15..d5ed0658f8 100644
--- a/main/ticket/ticket_details.php
+++ b/main/ticket/ticket_details.php
@@ -177,7 +177,7 @@ div.row div.formw2 {
';
$ticket_id = $_GET['ticket_id'];
-$ticket = TicketManager::get_ticket_detail_by_id($ticket_id, $user_id);
+$ticket = TicketManager::get_ticket_detail_by_id($ticket_id);
if (!isset($ticket['ticket'])) {
api_not_allowed();
}