';
diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php
index 83e90114bb6..508cd1c159e 100644
--- a/htdocs/core/lib/security.lib.php
+++ b/htdocs/core/lib/security.lib.php
@@ -142,7 +142,7 @@ function dol_hash($chain, $type='0')
* If constant MAIN_SECURITY_HASH_ALGO is defined, we use this function as hashing function.
* If constant MAIN_SECURITY_SALT is defined, we use it as a salt.
*
- * @param string $chain String to hash
+ * @param string $chain String to hash (not hashed string)
* @param string $hash hash to compare
* @param string $type Type of hash ('0':auto, '1':sha1, '2':sha1+md5, '3':md5, '4':md5 for OpenLdap, '5':sha256). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'.
* @return bool True if the computed hash is the same as the given one
diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql
index 20b0a874879..040739e8ce7 100644
--- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql
+++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql
@@ -150,6 +150,9 @@ UPDATE llx_c_payment_term SET decalage = nbjour, nbjour = 0 where decalage IS NU
UPDATE llx_holiday SET ref = rowid WHERE ref IS NULL;
+-- DROP TABLE llx_emailcollector_emailcollectorfilter;
+-- DROP TABLE llx_emailcollector_emailcollectoraction;
+-- DROP TABLE llx_emailcollector_emailcollector;
CREATE TABLE llx_emailcollector_emailcollector(
-- BEGIN MODULEBUILDER FIELDS
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 6ea7940d7a0..bbdc82b1b8b 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -4848,16 +4848,20 @@ function migrate_user_photospath()
{
while ($obj = $db->fetch_object($resql))
{
+ print '.';
+
$fuser->fetch($obj->uid);
//echo ''.$fuser->id.' -> '.$fuser->entity;
- $entity = (!empty($fuser->entity)) ? $fuser->entity : 1;
+ $entity = (empty($fuser->entity) ? 1 : $fuser->entity);
if ($entity > 1) {
$dir = DOL_DATA_ROOT . '/' . $entity . '/users';
} else {
$dir = $conf->user->multidir_output[$entity]; // $conf->user->multidir_output[] for each entity is construct by the multicompany module
}
+ if ($dir)
+ {
$origin = $dir .'/'. get_exdir($fuser->id,2,0,0,$fuser,'user');
- $destin = $dir.'/'.$fuser->id;
+ $destin = $dir .'/'. $fuser->id;
$error = 0;
@@ -4895,6 +4899,7 @@ function migrate_user_photospath()
}
}
}
+ }
}
}
diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index 2655ebbdc05..12333c0de9d 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -56,6 +56,7 @@ WorkloadNotDefined=Workload not defined
NewTimeSpent=Time spent
MyTimeSpent=My time spent
BillTime=Bill the time spent
+BillTimeShort=Bill time
Tasks=Tasks
Task=Task
TaskDateStart=Task start date
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 8bf377a9844..6c9db443487 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -618,9 +618,9 @@ if ($action == 'create' && $user->rights->projet->creer)
print '
';
print '';
print '
';
-
+var_dump($conf->global->PROJECT_USE_TASKS);
// Bill time
- if (! empty($conf->global->PROJECT_BILL_TIME_SPENT))
+ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_BILL_TIME_SPENT))
{
print '
';
// Bill time
- if (! empty($conf->global->PROJECT_BILL_TIME_SPENT))
+ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_BILL_TIME_SPENT))
{
print '
';
// Bill time
- if (! empty($conf->global->PROJECT_BILL_TIME_SPENT))
+ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_BILL_TIME_SPENT))
{
print '
';
// Bill time
- if (! empty($conf->global->PROJECT_BILL_TIME_SPENT))
+ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_BILL_TIME_SPENT))
{
print '
';
// Bill time
-if (! empty($conf->global->PROJECT_BILL_TIME_SPENT))
+if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_BILL_TIME_SPENT))
{
print '
'.$langs->trans("BillTime").'
';
print yn($object->bill_time);
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index dac11d34519..b220af0d96a 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -128,6 +128,7 @@ $arrayfields=array(
'p.fk_opp_status'=>array('label'=>$langs->trans("OpportunityStatusShort"), 'checked'=>1, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES?1:0), 'position'=>104),
'p.opp_percent'=>array('label'=>$langs->trans("OpportunityProbabilityShort"), 'checked'=>1, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES?1:0), 'position'=>105),
'p.budget_amount'=>array('label'=>$langs->trans("Budget"), 'checked'=>0, 'position'=>110),
+ 'p.bill_time'=>array('label'=>$langs->trans("BillTimeShort"), 'checked'=>0, 'position'=>115),
'p.datec'=>array('label'=>$langs->trans("DateCreationShort"), 'checked'=>0, 'position'=>500),
'p.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
'p.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
@@ -279,7 +280,7 @@ if (count($listofprojectcontacttype) == 0) $listofprojectcontacttype[0]='0';
$distinct='DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is only once.
$sql = "SELECT ".$distinct." p.rowid as id, p.ref, p.title, p.fk_statut, p.fk_opp_status, p.public, p.fk_user_creat";
-$sql.= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount";
+$sql.= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount, p.bill_time";
$sql.= ", s.nom as name, s.rowid as socid";
$sql.= ", cls.code as opp_status_code";
// We'll need these fields in order to filter by categ
@@ -620,6 +621,12 @@ if (! empty($arrayfields['p.budget_amount']['checked']))
print '';
print '
';
+}
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
@@ -669,6 +676,7 @@ if (! empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre
if (! empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'],$_SERVER["PHP_SELF"],'p.opp_amount',"",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'],$_SERVER["PHP_SELF"],'p.opp_percent',"",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'],$_SERVER["PHP_SELF"],'p.budget_amount',"",$param,'align="right"',$sortfield,$sortorder);
+if (! empty($arrayfields['p.bill_time']['checked'])) print_liste_field_titre($arrayfields['p.bill_time']['label'],$_SERVER["PHP_SELF"],'p.bill_time',"",$param,'align="right"',$sortfield,$sortorder);
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
@@ -847,6 +855,17 @@ while ($i < min($num,$limit))
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalbudgetfield']=$totalarray['nbfield'];
}
+ // Bill time
+ if (! empty($arrayfields['p.bill_time']['checked']))
+ {
+ print '
';
+ if (! $i) $totalarray['nbfield']++;
+ }
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index 2f06f698b14..04605c33065 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -417,7 +417,7 @@ if ($id > 0 || ! empty($ref))
print '
';
// Bill time
- if (! empty($conf->global->PROJECT_BILL_TIME_SPENT))
+ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_BILL_TIME_SPENT))
{
print '
';
// Bill time
- if (! empty($conf->global->PROJECT_BILL_TIME_SPENT))
+ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_BILL_TIME_SPENT))
{
print '