Fix: Photo for users and members were saved with .jpg even if .png

This commit is contained in:
Laurent Destailleur 2010-02-13 22:42:52 +00:00
parent 4801f576da
commit e2af657e1b
2 changed files with 6 additions and 5 deletions

View File

@ -63,7 +63,7 @@ $arrayofmembers=array();
// requete en prenant que les adherents a jour de cotisation
$sql = "SELECT d.rowid, d.prenom, d.nom, d.login, d.societe, d.datefin,";
$sql.= " d.adresse, d.cp, d.ville, d.naiss, d.email,";
$sql.= " d.adresse, d.cp, d.ville, d.naiss, d.email, d.photo,";
$sql.= " t.libelle as type,";
$sql.= " p.libelle as pays";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d";
@ -112,7 +112,8 @@ if ($result)
'textheader'=>$textheader,
'textfooter'=>$textfooter,
'textright'=>$textright,
'id'=>$objp->rowid);
'id'=>$objp->rowid,
'photo'=>$objp->photo);
$i++;
}

View File

@ -119,7 +119,7 @@ class pdf_standard {
// On imprime une etiquette
function Add_PDF_card(&$pdf,$textleft,$header='',$footer='',$outputlangs,$textright='',$idmember)
function Add_PDF_card(&$pdf,$textleft,$header='',$footer='',$outputlangs,$textright='',$idmember,$photomember)
{
global $mysoc,$conf,$langs;
@ -148,7 +148,7 @@ class pdf_standard {
// Define photo
$dir=$conf->adherent->dir_output;
$file=$idmember.".jpg";
$file=get_exdir($idmember,2).$photomember;
$photo=$dir.'/'.$file;
if (! is_readable($photo)) $photo='';
@ -421,7 +421,7 @@ class pdf_standard {
foreach($arrayofmembers as $val)
{
// imprime le texte specifique sur la carte
$this->Add_PDF_card($pdf,$val['textleft'],$val['textheader'],$val['textfooter'],$langs,$val['textright'],$val['id']);
$this->Add_PDF_card($pdf,$val['textleft'],$val['textheader'],$val['textfooter'],$langs,$val['textright'],$val['id'],$val['photo']);
}
//$pdf->SetXY(10, 295);