fix warnings in ticket list

This commit is contained in:
Frédéric FRANCE 2021-10-24 09:59:30 +02:00
parent 13f04053a1
commit d240a9f774
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
7 changed files with 15 additions and 15 deletions

View File

@ -1006,13 +1006,13 @@ if ($action == 'create' && $user->rights->projet->creer) {
$morehtmlref .= dol_escape_htmltag($object->title);
// Thirdparty
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : ';
if ($object->thirdparty->id > 0) {
if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) {
$morehtmlref .= $object->thirdparty->getNomUrl(1, 'project');
}
$morehtmlref .= '</div>';
// Define a complementary filter for search of next/prev ref.
if (!$user->rights->projet->all->lire) {
if (empty($user->rights->projet->all->lire)) {
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
}

View File

@ -294,13 +294,13 @@ if ($id > 0 || !empty($ref)) {
// Title
$morehtmlref .= $object->title;
// Thirdparty
if ($object->thirdparty->id > 0) {
if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) {
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project');
}
$morehtmlref .= '</div>';
// Define a complementary filter for search of next/prev ref.
if (!$user->rights->projet->all->lire) {
if (empty($user->rights->projet->all->lire)) {
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}

View File

@ -134,7 +134,7 @@ if ($object->id > 0) {
// Title
$morehtmlref .= $object->title;
// Thirdparty
if ($object->thirdparty->id > 0) {
if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) {
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project');
}
$morehtmlref .= '</div>';

View File

@ -164,7 +164,7 @@ if ($id == '' && $ref == '') {
exit();
}
$mine = $_REQUEST['mode'] == 'mine' ? 1 : 0;
$mine = (!empty($_REQUEST['mode']) && $_REQUEST['mode'] == 'mine') ? 1 : 0;
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
$object = new Project($db);
@ -216,13 +216,13 @@ $morehtmlref = '<div class="refidno">';
// Title
$morehtmlref .= $object->title;
// Thirdparty
if ($object->thirdparty->id > 0) {
if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) {
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project');
}
$morehtmlref .= '</div>';
// Define a complementary filter for search of next/prev ref.
if (!$user->rights->projet->all->lire) {
if (empty($user->rights->projet->all->lire)) {
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
$object->next_prev_filter = " te.rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}

View File

@ -33,7 +33,7 @@ $action = GETPOST('action', 'aZ09');
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$mine = $_REQUEST['mode'] == 'mine' ? 1 : 0;
$mine = (isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'mine') ? 1 : 0;
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
$object = new Project($db);
@ -100,7 +100,7 @@ if ($id > 0 || !empty($ref)) {
// Title
$morehtmlref .= $object->title;
// Thirdparty
if ($object->thirdparty->id > 0) {
if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) {
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project');
}
$morehtmlref .= '</div>';

View File

@ -550,13 +550,13 @@ if ($id > 0 || !empty($ref)) {
// Title
$morehtmlref .= $object->title;
// Thirdparty
if ($object->thirdparty->id > 0) {
if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) {
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project');
}
$morehtmlref .= '</div>';
// Define a complementary filter for search of next/prev ref.
if (!$user->rights->projet->all->lire) {
if (empty($user->rights->projet->all->lire)) {
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}

View File

@ -719,7 +719,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
$head = project_prepare_head($projectstatic);
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'));
$param = ($mode == 'mine' ? '&mode=mine' : '');
$param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : '');
// Project card
@ -729,13 +729,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
// Title
$morehtmlref .= $projectstatic->title;
// Thirdparty
if ($projectstatic->thirdparty->id > 0) {
if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project');
}
$morehtmlref .= '</div>';
// Define a complementary filter for search of next/prev ref.
if (!$user->rights->projet->all->lire) {
if (empty($user->rights->projet->all->lire)) {
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}