Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/includes/odtphp/odf.php
This commit is contained in:
commit
f32b2e9f1f
@ -2465,7 +2465,7 @@ class Adherent extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return array Tableau info des attributs
|
* @return array Tableau info des attributs
|
||||||
*/
|
*/
|
||||||
private function _load_ldap_info()
|
public function _load_ldap_info()
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|||||||
@ -190,7 +190,7 @@ $head = ticketAdminPrepareHead();
|
|||||||
|
|
||||||
dol_fiche_head($head, 'settings', $langs->trans("Module56000Name"), -1, "ticket");
|
dol_fiche_head($head, 'settings', $langs->trans("Module56000Name"), -1, "ticket");
|
||||||
|
|
||||||
print '<span class="opacitymedium">'.$langs->trans("TicketSetupDictionaries") . '</span> : <a href="' . dol_buildpath('/admin/dict.php', 1) . '" >' . dol_buildpath('/admin/dict.php', 2) . '</a><br>';
|
print '<span class="opacitymedium">'.$langs->trans("TicketSetupDictionaries") . '</span> : <a href="'.DOL_URL_ROOT.'/admin/dict.php">'.$langs->trans("ClickHereToGoTo", $langs->transnoentitiesnoconv("DictionarySetup")).'</a><br>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|||||||
@ -525,7 +525,7 @@ class Contact extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return array Tableau info des attributs
|
* @return array Tableau info des attributs
|
||||||
*/
|
*/
|
||||||
private function _load_ldap_info()
|
public function _load_ldap_info()
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|||||||
@ -229,7 +229,7 @@ class DolGraph
|
|||||||
/**
|
/**
|
||||||
* Set width
|
* Set width
|
||||||
*
|
*
|
||||||
* @param int $w Width
|
* @param int|string $w Width (Example: 320 or '100%')
|
||||||
* @return boolean|null True
|
* @return boolean|null True
|
||||||
*/
|
*/
|
||||||
public function SetWidth($w)
|
public function SetWidth($w)
|
||||||
|
|||||||
@ -403,9 +403,13 @@ class DoliDBSqlite3 extends DoliDB
|
|||||||
*/
|
*/
|
||||||
public function query($query, $usesavepoint = 0, $type = 'auto')
|
public function query($query, $usesavepoint = 0, $type = 'auto')
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
$ret=null;
|
$ret=null;
|
||||||
|
|
||||||
$query = trim($query);
|
$query = trim($query);
|
||||||
$this->error = 0;
|
|
||||||
|
$this->error = '';
|
||||||
|
|
||||||
// Convert MySQL syntax to SQLite syntax
|
// Convert MySQL syntax to SQLite syntax
|
||||||
if (preg_match('/ALTER\s+TABLE\s*(.*)\s*ADD\s+CONSTRAINT\s+(.*)\s*FOREIGN\s+KEY\s*\(([\w,\s]+)\)\s*REFERENCES\s+(\w+)\s*\(([\w,\s]+)\)/i', $query, $reg)) {
|
if (preg_match('/ALTER\s+TABLE\s*(.*)\s*ADD\s+CONSTRAINT\s+(.*)\s*FOREIGN\s+KEY\s*\(([\w,\s]+)\)\s*REFERENCES\s+(\w+)\s*\(([\w,\s]+)\)/i', $query, $reg)) {
|
||||||
@ -449,7 +453,8 @@ class DoliDBSqlite3 extends DoliDB
|
|||||||
}
|
}
|
||||||
//print "After convertSQLFromMysql:\n".$query."<br>\n";
|
//print "After convertSQLFromMysql:\n".$query."<br>\n";
|
||||||
|
|
||||||
dol_syslog('sql='.$query, LOG_DEBUG);
|
if (! in_array($query, array('BEGIN','COMMIT','ROLLBACK'))) dol_syslog('sql='.$query, LOG_DEBUG);
|
||||||
|
if (empty($query)) return false; // Return false = error if empty request
|
||||||
|
|
||||||
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
|
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
|
||||||
try {
|
try {
|
||||||
@ -481,7 +486,8 @@ class DoliDBSqlite3 extends DoliDB
|
|||||||
$errormsg .= ' ('.$this->lasterrno.')';
|
$errormsg .= ' ('.$this->lasterrno.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog($errormsg, LOG_ERR);
|
if ($conf->global->SYSLOG_LEVEL < LOG_DEBUG) dol_syslog(get_class($this)."::query SQL Error query: ".$query, LOG_ERR); // Log of request was not yet done previously
|
||||||
|
dol_syslog(get_class($this)."::query SQL Error message: ".$errormsg, LOG_ERR);
|
||||||
}
|
}
|
||||||
$this->lastquery=$query;
|
$this->lastquery=$query;
|
||||||
$this->_results = $ret;
|
$this->_results = $ret;
|
||||||
|
|||||||
@ -99,6 +99,7 @@ class modTicket extends DolibarrModules
|
|||||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||||
$this->phpmin = array(5,4); // Minimum version of PHP required by module
|
$this->phpmin = array(5,4); // Minimum version of PHP required by module
|
||||||
$this->langfiles = array("ticket");
|
$this->langfiles = array("ticket");
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
// List of particular constants to add when module is enabled
|
// List of particular constants to add when module is enabled
|
||||||
// (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
|
// (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
|
||||||
|
|||||||
@ -133,6 +133,7 @@ TicketsIndex=Ticket - home
|
|||||||
TicketList=List of tickets
|
TicketList=List of tickets
|
||||||
TicketAssignedToMeInfos=This page display ticket list created by or assigned to current user
|
TicketAssignedToMeInfos=This page display ticket list created by or assigned to current user
|
||||||
NoTicketsFound=No ticket found
|
NoTicketsFound=No ticket found
|
||||||
|
NoUnreadTicketsFound=No unread ticket found
|
||||||
TicketViewAllTickets=View all tickets
|
TicketViewAllTickets=View all tickets
|
||||||
TicketViewNonClosedOnly=View only open tickets
|
TicketViewNonClosedOnly=View only open tickets
|
||||||
TicketStatByStatus=Tickets by status
|
TicketStatByStatus=Tickets by status
|
||||||
|
|||||||
@ -249,8 +249,8 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D")
|
|||||||
|
|
||||||
$dateinsertion = substr("$dateinsertion", 1);
|
$dateinsertion = substr("$dateinsertion", 1);
|
||||||
|
|
||||||
//mise a jour avec les nouveaux sujets dans la base
|
// update with new topics into database
|
||||||
if (isset($erreur_ajout_date) && !$erreur_ajout_date)
|
if (isset($erreur_ajout_date) && empty($erreur_ajout_date))
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_sondage";
|
$sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_sondage";
|
||||||
$sql.= " SET sujet = '".$db->escape($dateinsertion)."'";
|
$sql.= " SET sujet = '".$db->escape($dateinsertion)."'";
|
||||||
|
|||||||
@ -153,7 +153,7 @@ if (empty($reshook))
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$resql = $object->update($object->id, $user);
|
$resql = $object->update($object->id, $user);
|
||||||
if (! $resql || $resql < 0)
|
if ($resql <= 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
/* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||||
|
* Copyright (C) - 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,7 +19,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/public/ticket/index.php
|
* \file htdocs/public/ticket/index.php
|
||||||
* \ingroup ticket
|
* \ingroup ticket
|
||||||
* \brief Public file to add and manage ticket
|
* \brief Public page to add and manage ticket
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1');
|
if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1');
|
||||||
@ -56,11 +57,15 @@ $formticket = new FormTicket($db);
|
|||||||
|
|
||||||
$arrayofjs = array();
|
$arrayofjs = array();
|
||||||
$arrayofcss = array('/ticket/css/styles.css.php');
|
$arrayofcss = array('/ticket/css/styles.css.php');
|
||||||
|
|
||||||
|
if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
|
||||||
|
{
|
||||||
|
print $langs->trans('TicketPublicInterfaceForbidden');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss);
|
llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss);
|
||||||
|
|
||||||
if (!$conf->global->TICKET_ENABLE_PUBLIC_INTERFACE) {
|
|
||||||
print '<div class="error">' . $langs->trans('TicketPublicInterfaceForbidden') . '</div>';
|
|
||||||
} else {
|
|
||||||
print '<div style="margin: 0 auto; width:60%">';
|
print '<div style="margin: 0 auto; width:60%">';
|
||||||
print '<p style="text-align: center">' . ($conf->global->TICKET_PUBLIC_TEXT_HOME ? $conf->global->TICKET_PUBLIC_TEXT_HOME : $langs->trans("TicketPublicDesc")) . '</p>';
|
print '<p style="text-align: center">' . ($conf->global->TICKET_PUBLIC_TEXT_HOME ? $conf->global->TICKET_PUBLIC_TEXT_HOME : $langs->trans("TicketPublicDesc")) . '</p>';
|
||||||
print '<div class="ticketform">';
|
print '<div class="ticketform">';
|
||||||
@ -70,7 +75,6 @@ if (!$conf->global->TICKET_ENABLE_PUBLIC_INTERFACE) {
|
|||||||
print '<div style="clear:both;"></div>';
|
print '<div style="clear:both;"></div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
htmlPrintOnlinePaymentFooter($mysoc, $langs, 1, $suffix, $object);
|
htmlPrintOnlinePaymentFooter($mysoc, $langs, 1, $suffix, $object);
|
||||||
|
|||||||
@ -24,6 +24,7 @@ require '../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT . '/ticket/class/actions_ticket.class.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 . '/ticket/class/ticketstats.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/dolgraph.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/dolgraph.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('companies', 'other', 'ticket'));
|
$langs->loadLangs(array('companies', 'other', 'ticket'));
|
||||||
@ -102,8 +103,8 @@ if (empty($endyear)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$startyear = $endyear - 1;
|
$startyear = $endyear - 1;
|
||||||
$WIDTH = (($shownb && $showtot) || !empty($conf->dol_optimize_smallscreen)) ? '256' : '320';
|
$WIDTH = (($shownb && $showtot) || !empty($conf->dol_optimize_smallscreen)) ? '100%' : '80%';
|
||||||
$HEIGHT = '192';
|
$HEIGHT = '228';
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
@ -120,16 +121,14 @@ $tick = array(
|
|||||||
'closed' => 0,
|
'closed' => 0,
|
||||||
'deleted' => 0,
|
'deleted' => 0,
|
||||||
);
|
);
|
||||||
$total = 0;
|
|
||||||
$sql = "SELECT t.fk_statut, COUNT(t.fk_statut) as nb";
|
$sql = "SELECT t.fk_statut, COUNT(t.fk_statut) as nb";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) {
|
if (!$user->rights->societe->client->voir && !$socid) {
|
||||||
$sql .= ", " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
|
$sql .= ", " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
|
||||||
}
|
}
|
||||||
|
$sql .= ' WHERE t.entity IN (' . getEntity('ticket') . ')';
|
||||||
$sql .= ' WHERE t.entity IN (' . getEntity('ticket', 1) . ')';
|
$sql .= dolSqlDateFilter('datec', 0, 0, $endyear);
|
||||||
$sql .= " AND t.fk_statut IS NOT NULL";
|
|
||||||
$sql .= " AND date_format(datec,'%Y') = '" . $endyear . "'";
|
|
||||||
if (!$user->rights->societe->client->voir && !$socid) {
|
if (!$user->rights->societe->client->voir && !$socid) {
|
||||||
$sql .= " AND t.fk_soc = sc.fk_soc AND sc.fk_user = " . $user->id;
|
$sql .= " AND t.fk_soc = sc.fk_soc AND sc.fk_user = " . $user->id;
|
||||||
}
|
}
|
||||||
@ -149,44 +148,41 @@ $result = $db->query($sql);
|
|||||||
if ($result) {
|
if ($result) {
|
||||||
while ($objp = $db->fetch_object($result)) {
|
while ($objp = $db->fetch_object($result)) {
|
||||||
$found = 0;
|
$found = 0;
|
||||||
if ($objp->fk_statut == 0) {
|
if ($objp->fk_statut == Ticket::STATUS_NOT_READ) {
|
||||||
$tick['unread'] = $objp->nb;
|
$tick['unread'] = $objp->nb;
|
||||||
}
|
}
|
||||||
if ($objp->fk_statut == 1) {
|
if ($objp->fk_statut == Ticket::STATUS_READ) {
|
||||||
$tick['read'] = $objp->nb;
|
$tick['read'] = $objp->nb;
|
||||||
}
|
}
|
||||||
if ($objp->fk_statut == 3) {
|
if ($objp->fk_statut == Ticket::STATUS_NEED_MORE_INFO) {
|
||||||
$tick['answered'] = $objp->nb;
|
$tick['needmoreinfo'] = $objp->nb;
|
||||||
}
|
}
|
||||||
if ($objp->fk_statut == 4) {
|
if ($objp->fk_statut == Ticket::STATUS_ASSIGNED) {
|
||||||
$tick['assigned'] = $objp->nb;
|
$tick['assigned'] = $objp->nb;
|
||||||
}
|
}
|
||||||
if ($objp->fk_statut == 5) {
|
if ($objp->fk_statut == Ticket::STATUS_IN_PROGRESS) {
|
||||||
$tick['inprogress'] = $objp->nb;
|
$tick['inprogress'] = $objp->nb;
|
||||||
}
|
}
|
||||||
if ($objp->fk_statut == 6) {
|
if ($objp->fk_statut == Ticket::STATUS_WAITING) {
|
||||||
$tick['waiting'] = $objp->nb;
|
$tick['waiting'] = $objp->nb;
|
||||||
}
|
}
|
||||||
if ($objp->fk_statut == 8) {
|
if ($objp->fk_statut == Ticket::STATUS_CLOSED) {
|
||||||
$tick['closed'] = $objp->nb;
|
$tick['closed'] = $objp->nb;
|
||||||
}
|
}
|
||||||
if ($objp->fk_statut == 9) {
|
if ($objp->fk_statut == Ticket::STATUS_CANCELED) {
|
||||||
$tick['deleted'] = $objp->nb;
|
$tick['canceled'] = $objp->nb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((round($tick['unread']) ? 1 : 0) +(round($tick['read']) ? 1 : 0) +(round($tick['answered']) ? 1 : 0) +(round($tick['assigned']) ? 1 : 0) +(round($tick['inprogress']) ? 1 : 0) +(round($tick['waiting']) ? 1 : 0) +(round($tick['closed']) ? 1 : 0) +(round($tick['deleted']) ? 1 : 0) >= 2
|
|
||||||
) {
|
|
||||||
$dataseries = array();
|
$dataseries = array();
|
||||||
$dataseries[] = array('label' => $langs->trans("Unread"), 'data' => round($tick['unread']));
|
$dataseries[] = array('label' => $langs->trans("Unread"), 'data' => round($tick['unread']));
|
||||||
$dataseries[] = array('label' => $langs->trans("Read"), 'data' => round($tick['read']));
|
$dataseries[] = array('label' => $langs->trans("Read"), 'data' => round($tick['read']));
|
||||||
$dataseries[] = array('label' => $langs->trans("Answered"), 'data' => round($tick['answered']));
|
$dataseries[] = array('label' => $langs->trans("NeedMoreInformation"), 'data' => round($tick['needmoreinfo']));
|
||||||
$dataseries[] = array('label' => $langs->trans("Assigned"), 'data' => round($tick['assigned']));
|
$dataseries[] = array('label' => $langs->trans("Assigned"), 'data' => round($tick['assigned']));
|
||||||
$dataseries[] = array('label' => $langs->trans("InProgress"), 'data' => round($tick['inprogress']));
|
$dataseries[] = array('label' => $langs->trans("InProgress"), 'data' => round($tick['inprogress']));
|
||||||
$dataseries[] = array('label' => $langs->trans("Waiting"), 'data' => round($tick['waiting']));
|
$dataseries[] = array('label' => $langs->trans("Waiting"), 'data' => round($tick['waiting']));
|
||||||
$dataseries[] = array('label' => $langs->trans("Closed"), 'data' => round($tick['closed']));
|
$dataseries[] = array('label' => $langs->trans("Closed"), 'data' => round($tick['closed']));
|
||||||
$dataseries[] = array('label' => $langs->trans("Deleted"), 'data' => round($tick['deleted']));
|
$dataseries[] = array('label' => $langs->trans("Canceled"), 'data' => round($tick['canceled']));
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
@ -210,10 +206,16 @@ $stringtoshow .= '</div>';
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><th >' . $langs->trans("Statistics") . ' ' . img_picto('', 'filter.png', 'id="idsubimgDOLUSERCOOKIE_ticket_by_status" class="linkobject"') . '</th></tr>';
|
print '<tr class="liste_titre"><th >' . $langs->trans("Statistics") . ' ' . img_picto('', 'filter.png', 'id="idsubimgDOLUSERCOOKIE_ticket_by_status" class="linkobject"') . '</th></tr>';
|
||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td class="center">';
|
||||||
|
print $stringtoshow;
|
||||||
|
|
||||||
// don't display graph if no series
|
// don't display graph if no series
|
||||||
if (! empty($dataseries) && count($dataseries) > 1) {
|
if (! empty($dataseries) && count($dataseries) > 1) {
|
||||||
|
$totalnb=0;
|
||||||
|
foreach ($dataseries as $key => $value) {
|
||||||
|
$totalnb += $value['data'];
|
||||||
|
}
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
foreach ($dataseries as $key => $value) {
|
foreach ($dataseries as $key => $value) {
|
||||||
$data[] = array($value['label'], $value['data']);
|
$data[] = array($value['label'], $value['data']);
|
||||||
@ -244,10 +246,9 @@ if (! empty($dataseries) && count($dataseries) > 1) {
|
|||||||
//$px1->SetTitle($langs->trans("TicketStatByStatus"));
|
//$px1->SetTitle($langs->trans("TicketStatByStatus"));
|
||||||
|
|
||||||
$px1->draw($filenamenb, $fileurlnb);
|
$px1->draw($filenamenb, $fileurlnb);
|
||||||
print $px1->show();
|
print $px1->show($totalnb?0:1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print $stringtoshow;
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -303,7 +304,7 @@ if ($result) {
|
|||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><th colspan="5">' . $transRecordedType . '</th>';
|
print '<tr class="liste_titre"><th colspan="5">' . $transRecordedType . '</th>';
|
||||||
print '<th class="right" colspan="2"><a href="'.DOL_URL_ROOT.'/ticket/list.php">'.$langs->trans("FullList").'</th>';
|
print '<th class="right" colspan="2"><a href="'.DOL_URL_ROOT.'/ticket/list.php?search_fk_statut[]='.Ticket::STATUS_NOT_READ.'">'.$langs->trans("FullList").'</th>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
if ($num > 0) {
|
if ($num > 0) {
|
||||||
|
|
||||||
@ -359,7 +360,7 @@ if ($result) {
|
|||||||
|
|
||||||
$db->free();
|
$db->free();
|
||||||
} else {
|
} else {
|
||||||
print '<tr><td colspan="6" class="opacitymedium">' . $langs->trans('NoTicketsFound') . '</td></tr>';
|
print '<tr><td colspan="6" class="opacitymedium">' . $langs->trans('NoUnreadTicketsFound') . '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@ -774,7 +774,7 @@ class User extends CommonObject
|
|||||||
dol_syslog(get_class($this)."::clearrights reset user->rights");
|
dol_syslog(get_class($this)."::clearrights reset user->rights");
|
||||||
$this->rights='';
|
$this->rights='';
|
||||||
$this->nb_rights=0;
|
$this->nb_rights=0;
|
||||||
$this->all_permissions_are_loaded=false;
|
$this->all_permissions_are_loaded=0;
|
||||||
$this->_tab_loaded=array();
|
$this->_tab_loaded=array();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -799,16 +799,16 @@ class User extends CommonObject
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->all_permissions_are_loaded)
|
if (! empty($this->all_permissions_are_loaded))
|
||||||
{
|
{
|
||||||
// We already loaded all rights for this user, so we leave
|
// We already loaded all rights for this user, so we leave
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recuperation des droits utilisateurs + recuperation des droits groupes
|
// Get permission of users + Get permissions of groups
|
||||||
|
|
||||||
// D'abord les droits utilisateurs
|
// First user permissions
|
||||||
$sql = "SELECT DISTINCT r.module, r.perms, r.subperms";
|
$sql = "SELECT DISTINCT r.module, r.perms, r.subperms";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user_rights as ur";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user_rights as ur";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."rights_def as r";
|
$sql.= ", ".MAIN_DB_PREFIX."rights_def as r";
|
||||||
@ -862,7 +862,7 @@ class User extends CommonObject
|
|||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Maintenant les droits groupes
|
// Now permissions of groups
|
||||||
$sql = "SELECT DISTINCT r.module, r.perms, r.subperms";
|
$sql = "SELECT DISTINCT r.module, r.perms, r.subperms";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup_rights as gr,";
|
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup_rights as gr,";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."usergroup_user as gu,";
|
$sql.= " ".MAIN_DB_PREFIX."usergroup_user as gu,";
|
||||||
@ -933,7 +933,7 @@ class User extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Si module defini, on le marque comme charge en cache
|
// If module defined, we flag it as loaded into cache
|
||||||
$this->_tab_loaded[$moduletag]=1;
|
$this->_tab_loaded[$moduletag]=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2300,7 +2300,6 @@ class User extends CommonObject
|
|||||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpictoimg) $withpictoimg=0;
|
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpictoimg) $withpictoimg=0;
|
||||||
|
|
||||||
$result=''; $label='';
|
$result=''; $label='';
|
||||||
$link=''; $linkstart=''; $linkend='';
|
|
||||||
|
|
||||||
if (! empty($this->photo))
|
if (! empty($this->photo))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -552,13 +552,13 @@ class UserGroup extends CommonObject
|
|||||||
|
|
||||||
if ($moduletag && isset($this->_tab_loaded[$moduletag]) && $this->_tab_loaded[$moduletag])
|
if ($moduletag && isset($this->_tab_loaded[$moduletag]) && $this->_tab_loaded[$moduletag])
|
||||||
{
|
{
|
||||||
// Le fichier de ce module est deja charge
|
// Rights for this module are already loaded, so we leave
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($this->all_permissions_are_loaded))
|
if (! empty($this->all_permissions_are_loaded))
|
||||||
{
|
{
|
||||||
// Si les permissions ont deja ete chargees, on quitte
|
// We already loaded all rights for this group, so we leave
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -618,7 +618,7 @@ class UserGroup extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Si module defini, on le marque comme charge en cache
|
// If module defined, we flag it as loaded into cache
|
||||||
$this->_tab_loaded[$moduletag]=1;
|
$this->_tab_loaded[$moduletag]=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -867,7 +867,6 @@ class UserGroup extends CommonObject
|
|||||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpicto) $withpicto=0;
|
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpicto) $withpicto=0;
|
||||||
|
|
||||||
$result=''; $label='';
|
$result=''; $label='';
|
||||||
$link=''; $linkstart=''; $linkend='';
|
|
||||||
|
|
||||||
$label.= '<div class="centpercent">';
|
$label.= '<div class="centpercent">';
|
||||||
$label.= '<u>' . $langs->trans("Group") . '</u><br>';
|
$label.= '<u>' . $langs->trans("Group") . '</u><br>';
|
||||||
@ -957,7 +956,7 @@ class UserGroup extends CommonObject
|
|||||||
public function _load_ldap_info()
|
public function _load_ldap_info()
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf,$langs;
|
global $conf;
|
||||||
|
|
||||||
$info=array();
|
$info=array();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user