Fix gravatar

This commit is contained in:
Laurent Destailleur 2017-07-08 21:39:48 +02:00
parent d223283359
commit 45d8fbb19e
2 changed files with 4 additions and 2 deletions

View File

@ -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
{

View File

@ -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";