From 20c50e809d848a335195df76d54b82964ebd7e18 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 May 2018 10:43:40 +0200 Subject: [PATCH 1/2] Start 6.0.8 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 7f5b0f5e746..9ab5de809b9 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr'); -if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.7'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.8'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (! defined('EURO')) define('EURO',chr(128)); From 630e38072b84c68a3a4dd5ebc927e78f7b11ac74 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Tue, 15 May 2018 17:02:54 +0200 Subject: [PATCH 2/2] fix SQL and add hook --- htdocs/projet/contact.php | 37 +++++++++++++++++++------------------ htdocs/projet/element.php | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 72b82ac2bb0..6da1028d473 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -49,6 +49,7 @@ $socid=0; //if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $id,'projet&project'); +$hookmanager->initHooks(array('projectcontactcard','globalcard')); /* * Actions @@ -150,26 +151,26 @@ if ($id > 0 || ! empty($ref)) // Project card - + $linkback = ''.$langs->trans("BackToList").''; - + $morehtmlref='
'; // Title $morehtmlref.=$object->title; // Thirdparty - if ($object->thirdparty->id > 0) + if ($object->thirdparty->id > 0) { $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref.='
'; - + // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user,0,0); $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")"; } - + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -178,7 +179,7 @@ if ($id > 0 || ! empty($ref)) print '
'; print ''; - + // Visibility print ''; - + // Opportunity percent print ''; } - + // Date start - end print '
'.$langs->trans("Visibility").''; if ($object->public) print $langs->trans('SharedProject'); @@ -192,7 +193,7 @@ if ($id > 0 || ! empty($ref)) $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code'); if ($code) print $langs->trans("OppStatus".$code); print '
'.$langs->trans("OpportunityProbability").''; if (strcmp($object->opp_percent,'')) print price($object->opp_percent,'',$langs,1,0).' %'; @@ -203,7 +204,7 @@ if ($id > 0 || ! empty($ref)) if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency); print '
'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; $start = dol_print_date($object->date_start,'dayhour'); @@ -222,40 +223,40 @@ if ($id > 0 || ! empty($ref)) // Other attributes $cols = 2; include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; - + print "
"; print ''; print '
'; print '
'; print '
'; - + print ''; - + // Description print ''; - + // Categories if ($conf->categorie->enabled) { print '"; } - + print '
'.$langs->trans("Description").''; print nl2br($object->description); print '
'.$langs->trans("Categories").''; print $form->showCategories($object->id,'project',1); print "
'; - + print '
'; print '
'; print ''; - + print '
'; - + dol_fiche_end(); - + print '
'; - + // Contacts lines (modules that overwrite templates must declare this into descriptor) $dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl')); foreach($dirtpls as $reldir) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 17b3cbd65f9..85bbf906fef 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -145,7 +145,7 @@ $morehtmlref.=''; if (! $user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user,0,0); - $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")"; + $object->next_prev_filter=" te.rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")"; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);