From dc224f3c880ed69748093c9175c93ee695a183e3 Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Mon, 13 Jun 2016 16:25:27 +0200 Subject: [PATCH 1/9] NEW hook in element overview --- htdocs/projet/element.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index fe6fe738110..a69108905bf 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -95,6 +95,8 @@ if ($user->societe_id > 0) $socid=$user->societe_id; $result = restrictedArea($user, 'projet', $projectid, 'projet&project'); +$hookmanager->initHooks(array('projectOverview')); + /* * View */ @@ -347,6 +349,15 @@ $listofreferent=array( 'test'=>$conf->projet->enabled && $user->rights->projet->lire && $conf->salaries->enabled && empty($conf->global->PROJECT_HIDE_TASKS)), ); +$parameters=array('listofreferent'=>$listofreferent); +$resHook = $hookmanager->executeHooks('completeListOfReferent',$parameters,$object,$action); + +if(!empty($hookmanager->resArray)) { + + $listofreferent = array_merge($listofreferent, $hookmanager->resArray); + +} + if ($action=="addelement") { $tablename = GETPOST("tablename"); @@ -435,6 +446,7 @@ foreach ($listofreferent as $key => $value) $element = new $classname($db); $elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee); + if (count($elementarray)>0 && is_array($elementarray)) { $total_ht = 0; @@ -450,7 +462,7 @@ foreach ($listofreferent as $key => $value) $element->fetch($idofelement); if ($idofelementuser) $elementuser->fetch($idofelementuser); - if ($tablename != 'expensereport_det') $element->fetch_thirdparty(); + if ($tablename != 'expensereport_det' && method_exists($element, 'fetch_thirdparty')) $element->fetch_thirdparty(); if ($tablename == 'don') $total_ht_by_line=$element->amount; elseif ($tablename == 'projet_task') @@ -676,7 +688,7 @@ foreach ($listofreferent as $key => $value) if ($tablename != 'expensereport_det') { - $element->fetch_thirdparty(); + if(method_exists($element, 'fetch_thirdparty')) $element->fetch_thirdparty(); } else { From c365d14c2c95b4f289b78ab0bb23c81ec4892ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 16 Jun 2016 13:00:38 +0200 Subject: [PATCH 2/9] New: Autoset port and admin user from db type [Usability] Enhance install procedure by automatically suggesting the database port and administrative user on database type selection. --- htdocs/install/fileconf.php | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 8d040e06ed4..d0cf9a4a385 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -369,7 +369,7 @@ if (! empty($force_install_message)) trans("Port"); ?> - value=""> @@ -484,9 +484,27 @@ if (! empty($force_install_message))