From 45d8fbb19e3626b21eaee22e2f2f3a862a6c2ba7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sat, 8 Jul 2017 21:39:48 +0200 Subject: [PATCH] Fix gravatar --- htdocs/core/class/html.form.class.php | 4 +++- htdocs/expensereport/class/expensereport.class.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e291277d8e4..ab64fad57dc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6098,7 +6098,9 @@ class Form */ global $dolibarr_main_url_root; $ret.='<!-- Put link to gravatar -->'; - $ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="Gravatar avatar" title="'.$email.' Gravatar avatar" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="https://www.gravatar.com/avatar/'.dol_hash(strtolower(trim($email)),3).'?s='.$width.'&d='.urlencode(dol_buildpath($nophoto,3)).'">'; // gravatar need md5 hash + //$defaultimg=urlencode(dol_buildpath($nophoto,3)); + $defaultimg='mm'; + $ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="Gravatar avatar" title="'.$email.' Gravatar avatar" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="https://www.gravatar.com/avatar/'.dol_hash(strtolower(trim($email)),3).'?s='.$width.'&d='.$defaultimg.'">'; // gravatar need md5 hash } else { diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index a91b1e83dc1..2251149c25a 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -620,7 +620,7 @@ class ExpenseReport extends CommonObject $sql.= " f.tms as date_modification,"; $sql.= " f.date_valid as datev,"; $sql.= " f.date_approve as datea,"; - $sql.= " f.fk_user_author as fk_user_creation,"; + //$sql.= " f.fk_user_author as fk_user_creation,"; // This is not user of creation but user the expense is for. $sql.= " f.fk_user_modif as fk_user_modification,"; $sql.= " f.fk_user_valid,"; $sql.= " f.fk_user_approve"; -- GitLab