Update index.php

This commit is contained in:
UT from dolibit 2022-09-23 11:21:56 +02:00 committed by GitHub
parent e1b5e5033f
commit f0bf7e662d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,17 +18,18 @@
*/
/**
* \file htdocs/ticket/agenda.php
* \ingroup ticket
* \file htdocs/ticket/index.php
* \ingroup ticket
*/
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php';
require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticketstats.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
$hookmanager = new HookManager($db);
@ -59,6 +60,7 @@ $year = GETPOST('year', 'int') > 0 ? GETPOST('year', 'int') : $nowyear;
$startyear = $year - (empty($conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS) ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
$endyear = $year;
// Initialize objects
$object = new Ticket($db);
// Security check
@ -68,6 +70,7 @@ if (empty($user->rights->ticket->read) && empty($user->rights->knowledgemanageme
}
/*
* Actions
*/
@ -75,9 +78,11 @@ if (empty($user->rights->ticket->read) && empty($user->rights->knowledgemanageme
// None
/*
* View
*/
$resultboxes = FormOther::getBoxesArea($user, "11"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
$form = new Form($db);
@ -405,7 +410,7 @@ if (!empty($user->rights->ticket->read)) {
//print $objp->category_label;
print "</td>";
// Severity
// Severity = Priority
print '<td class="nowrap">';
$s = $langs->getLabelFromKey($db, 'TicketSeverityShort'.$objp->severity_code, 'c_ticket_severity', 'code', 'label', $objp->severity_code);
print '<span title="'.dol_escape_htmltag($s).'">'.$s.'</span>';