[Phpmyadmin-devel] Patch to support multiple primary kets in schema

Marc Delisle DelislMa at CollegeSherbrooke.qc.ca
Mon Jul 1 13:17:49 CEST 2002


Merged, thanks.

Joshua Eichorn wrote:

> I didn't see any changes to this file in cvs since the rc1 release so 
> this should apply cleanly.
>
> This allows tables with multiple primary keys to be documented 
> correctly, without this only the last field is shaded.
>
> The Schema creation is great, thanks for the good work.
> -joshua eichorn
> jeichorn at phpdoc.org
> phpDocumentor (Php Auto Documentation) http://phpdoc.org
>
>------------------------------------------------------------------------
>
>--- pdf_schema.php	Wed Jun 19 13:44:29 2002
>+++ pdf_schema.php	Fri Jun 28 10:19:43 2002
>@@ -319,6 +319,7 @@
>     var $fields      = array();
>     var $height_cell = 6;
>     var $x, $y;
>+    var $primary     = array();
> 
> 
>     /**
>@@ -390,7 +391,7 @@
>         
>         reset($this->fields);
>         while (list(, $field) = each($this->fields)) {
>-            if($field == $this->primary){$pdf->SetFillColor(215,121,123);}
>+            if(in_array($field,$this->primary)){$pdf->SetFillColor(215,121,123);}
>             if($field == $this->displayfield){$pdf->SetFillColor(142,159,224);}
>             $pdf->PMA_PDF_cellScale($this->width, $this->height_cell, ' ' . $field, 1, 1, 'L', 1);
>             $pdf->PMA_PDF_setXScale($this->x);
>@@ -462,7 +463,7 @@
>         if(mysql_num_rows($result)>0){
>             while ($row = PMA_mysql_fetch_array($result)) {
>                 if($row['Key_name'] == 'PRIMARY'){
>-                    $this->primary = $row['Column_name'];
>+                    $this->primary[] = $row['Column_name'];
>                 }
>             }
>         }        
>@@ -778,6 +779,7 @@
> 
>         $pdf->SetDisplayMode('fullpage');
>         $pdf->Output($db . '_' . $pdf_page_number . '.pdf', TRUE);
>+        //$pdf->Output('', TRUE);
>     } // end of the "PMA_RT_showRt()" method
> 
> 
>  
>







More information about the Developers mailing list