diff --git a/htdocs/ticket/agenda.php b/htdocs/ticket/agenda.php
index 9ee8363dc46..dee2168136c 100644
--- a/htdocs/ticket/agenda.php
+++ b/htdocs/ticket/agenda.php
@@ -190,20 +190,21 @@ if (! empty($conf->projet->enabled))
$morehtmlref.='
'.$langs->trans('Project');
if ($user->rights->ticket->write)
{
- if ($action != 'classify')
+ if ($action != 'classify') {
//$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '';
$morehtmlref.=' : ';
- if ($action == 'classify') {
- //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
- $morehtmlref.='
';
- } else {
- $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
- }
+ }
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.='';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
} else {
if (! empty($object->fk_project)) {
$proj = new Project($db);
diff --git a/htdocs/ticket/class/api_tickets.class.php b/htdocs/ticket/class/api_tickets.class.php
index a4c71476269..4289fab99dc 100644
--- a/htdocs/ticket/class/api_tickets.class.php
+++ b/htdocs/ticket/class/api_tickets.class.php
@@ -148,9 +148,9 @@ class Tickets extends DolibarrApi
// String for user assigned
if ($this->ticket->fk_user_assign > 0) {
- $userStatic = new User($this->db);
- $userStatic->fetch($this->ticket->fk_user_assign);
- $this->ticket->fk_user_assign_string = $userStatic->firstname.' '.$userStatic->lastname;
+ $userStatic = new User($this->db);
+ $userStatic->fetch($this->ticket->fk_user_assign);
+ $this->ticket->fk_user_assign_string = $userStatic->firstname.' '.$userStatic->lastname;
}
// Messages of ticket
@@ -296,9 +296,9 @@ class Tickets extends DolibarrApi
$ticket_static = new Ticket($db);
if ($ticket_static->fetch($obj->rowid)) {
if ($ticket_static->fk_user_assign > 0) {
- $userStatic = new User($this->db);
- $userStatic->fetch($ticket_static->fk_user_assign);
- $ticket_static->fk_user_assign_string = $userStatic->firstname.' '.$userStatic->lastname;
+ $userStatic = new User($this->db);
+ $userStatic->fetch($ticket_static->fk_user_assign);
+ $ticket_static->fk_user_assign_string = $userStatic->firstname.' '.$userStatic->lastname;
}
$obj_ret[] = $this->_cleanObjectDatas($ticket_static);
}
diff --git a/htdocs/ticket/contact.php b/htdocs/ticket/contact.php
index 42a319c3720..65682fef2b3 100644
--- a/htdocs/ticket/contact.php
+++ b/htdocs/ticket/contact.php
@@ -181,20 +181,21 @@ if ($id > 0 || !empty($track_id) || !empty($ref)) {
$morehtmlref.='
'.$langs->trans('Project') . ' ';
if ($user->rights->ticket->write)
{
- if ($action != 'classify')
+ if ($action != 'classify') {
//$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '';
- $morehtmlref.=' : ';
- if ($action == 'classify') {
- //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
- $morehtmlref.='';
- } else {
- $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
- }
+ $morehtmlref.=' : ';
+ }
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.='';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
} else {
if (! empty($object->fk_project)) {
$proj = new Project($db);
diff --git a/htdocs/ticket/document.php b/htdocs/ticket/document.php
index c1cbaa26902..a80d455e43f 100644
--- a/htdocs/ticket/document.php
+++ b/htdocs/ticket/document.php
@@ -146,20 +146,21 @@ if ($object->id)
$morehtmlref.='
'.$langs->trans('Project') . ' ';
if ($user->rights->ticket->write)
{
- if ($action != 'classify')
+ if ($action != 'classify') {
//$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '';
- $morehtmlref.=' : ';
- if ($action == 'classify') {
- //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
- $morehtmlref.='';
- } else {
- $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
- }
+ $morehtmlref.=' : ';
+ }
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.='';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
} else {
if (! empty($object->fk_project)) {
$proj = new Project($db);
diff --git a/htdocs/ticket/messaging.php b/htdocs/ticket/messaging.php
index d5bda4297ca..7b4341cf684 100644
--- a/htdocs/ticket/messaging.php
+++ b/htdocs/ticket/messaging.php
@@ -189,20 +189,21 @@ if (! empty($conf->projet->enabled))
$morehtmlref.='
'.$langs->trans('Project');
if ($user->rights->ticket->write)
{
- if ($action != 'classify')
+ if ($action != 'classify') {
//$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '';
$morehtmlref.=' : ';
- if ($action == 'classify') {
- //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
- $morehtmlref.='';
- } else {
- $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
- }
+ }
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.='';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
} else {
if (! empty($object->fk_project)) {
$proj = new Project($db);
diff --git a/htdocs/ticket/tpl/linkedobjectblock.tpl.php b/htdocs/ticket/tpl/linkedobjectblock.tpl.php
index 439feb121f8..538519bbf2e 100644
--- a/htdocs/ticket/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/ticket/tpl/linkedobjectblock.tpl.php
@@ -21,11 +21,9 @@ if (empty($conf) || ! is_object($conf))
print "Error, template page can't be called as URL";
exit;
}
-?>
-
+print "\n";
-load('ticket');
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'datec', 'desc', 0, 0, 1);
-$total=0; $ilink=0;
+$total=0;
+$ilink=0;
foreach($linkedObjectBlock as $key => $objectlink)
{
$ilink++;
$trclass='oddeven';
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
-?>
+ ?>
| trans("Ticket"); ?>
global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print '
@@ -70,7 +69,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
?>
|
- 1)
{
@@ -86,6 +85,5 @@ if (count($linkedObjectBlock) > 1)
-
+print "\n";