Minor format code see #6715

1.9.x
Julio Montoya 11 years ago
parent 0a263121d2
commit ac73eea578
  1. 7
      plugin/ticket/src/download.php
  2. 2
      plugin/ticket/src/report.php
  3. 33
      plugin/ticket/src/ticket.class.php

@ -1,13 +1,11 @@
<?php
/* For licensing terms, see /license.txt */
/**
*
* @package chamilo.plugin.ticket
*/
/**
* Init section
*/
require_once '../config.php';
$plugin = TicketPlugin::create();
@ -20,6 +18,7 @@ $user_id = api_get_user_id();
if (!isset($_GET['file']) || !isset($_GET['title']) || !isset($_GET['ticket_id'])) {
api_not_allowed();
}
if (!api_is_platform_admin()) {
$ticket_id = intval($_GET['ticket_id']);
$table_support_messages = Database::get_main_table(TABLE_TICKET_MESSAGE);

@ -110,8 +110,6 @@ function show_form()
echo '<div class="ticket-form">';
echo '<form enctype="multipart/form-data" action="' . api_get_self() . '" method="post" name="send_ticket" id="send_ticket"
onsubmit="return validate()" style="width:100%">';
$courses_list = CourseManager::get_courses_list_by_user_id($user_id, false, true);
$select_course = '<div id="user_request" >
</div>';
echo $select_course;

@ -241,9 +241,15 @@ class TicketManager
$message = sprintf($plugin->get_lang('TicketAssignedMsg'), $info['complete_name'], $href, $ticket_id);
$mailTitle = sprintf($plugin->get_lang('TicketAssignX'), $ticket_id);
api_mail_html(
$info['complete_name'], $info['mail'], $mailTitle, $message, null, // sender name
$info['complete_name'],
$info['mail'],
$mailTitle,
$message,
null, // sender name
null, // sender e-mail
array('cc' => $sender['email']) // should be support e-mail (platform admin) here
array(
'cc' => $sender['email']
) // should be support e-mail (platform admin) here
);
}
}
@ -415,7 +421,7 @@ class TicketManager
'$user_id',
'$now'
)";
$result = Database::query($sql);
Database::query($sql);
return array(
'path' => $path_message_attach . $safe_new_file_name,
'filename' => $safe_file_name
@ -433,9 +439,12 @@ class TicketManager
* @return array
*/
public static function get_tickets_by_user_id(
$from, $number_of_items, $column, $direction, $user_id = null
)
{
$from,
$number_of_items,
$column,
$direction,
$user_id = null
) {
global $plugin;
$table_support_category = Database::get_main_table(
TABLE_TICKET_CATEGORY
@ -477,11 +486,13 @@ class TicketManager
$table_support_status status,
$table_main_user user,
$table_support_messages msg
WHERE cat.category_id = ticket.category_id
WHERE
cat.category_id = ticket.category_id
AND ticket.priority_id = priority.priority_id
AND ticket.status_id = status.status_id
AND user.user_id = ticket.request_user
AND ticket.ticket_id= msg.ticket_id AND message_id=1 ";
AND ticket.ticket_id= msg.ticket_id
AND message_id=1 ";
if (!$isAdmin) {
$sql .= " AND request_user = '$user_id' ";
}
@ -704,7 +715,8 @@ class TicketManager
$dif = $now - $last_edit_date;
if ($dif > 172800 && $row['priority_id'] == 'NRM' && $row['status_id'] != 'CLS') {
$actions .= '<a href="myticket.php?ticket_id=' . $row['ticket_id'] . '&amp;action=alert"><img src="' . $webPath . 'main/img/exclamation.png" border="0" /></a>';
$actions .= '<a href="myticket.php?ticket_id=' . $row['ticket_id'] . '&amp;action=alert">
<img src="' . $webPath . 'main/img/exclamation.png" border="0" /></a>';
}
if ($row['priority_id'] == 'HGH') {
$actions .= '<img src="' . $webCodePath . 'img/admin_star.png" border="0" />';
@ -930,7 +942,8 @@ class TicketManager
$table_support_category cat ,
$table_support_priority priority ,
$table_support_status status
WHERE ticket.ticket_id = '$ticket_id'
WHERE
ticket.ticket_id = '$ticket_id'
AND cat.category_id = ticket.category_id
AND priority.priority_id = ticket.priority_id
AND status.status_id = ticket.status_id ";

Loading…
Cancel
Save