cosmetic
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Wed, 29 Dec 2004 15:24:19 +0000 (15:24 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:27:01 +0000 (23:27 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-178

include/contacts.pdf.inc.php

index ebce038..af06a5f 100644 (file)
@@ -124,14 +124,13 @@ class ContactsPDF extends FPDF
         $this->broken = true;
     }
 
-    function Space($before=0.5)
+    function Space()
     {
         $x = $this->getX();
         $y = $this->getY();
-
         $this->SetLineWidth(0.1);
-        $this->Line($x, $y+$before, $x+90, $y+$before);
-        $this->setY($this->getY()+0.5+$before);
+        $this->Line($x, $y, $x+90, $y);
+        $this->setY($this->getY()+0.5);
     }
 
     function TableRow($l, $r, $font = 'Sans')
@@ -148,8 +147,8 @@ class ContactsPDF extends FPDF
         
         $this->setX($x+25);
         $this->MultiCell(65, 4, $r, '', 1);
-        
-        if ($y1 > $this->getY()) { $this->setY($y1); }
+       
+        $this->setY(max($y1, $this->getY())+0.5);
         $this->setX($x);
     }
 
@@ -221,7 +220,7 @@ class ContactsPDF extends FPDF
 
         $nom = $x['prenom'].' '.($x['epouse'] ? "{$x['epouse']} - née {$x['nom']}" : $x['nom'])." ({$x['promo']})";
         $this->Cell(0, 6, $nom, "T", 1, 'C', 1, $globals->baseurl."/fiche.php?user={$x['forlife']}");
-        $this->Space(0);
+        $this->Space();
 
         if ($x['mobile']) {
             $this->TableRow('mobile', $x['mobile'], 'Mono');