@@ -7,6 +7,8 @@ $Source$
|
||||
|
||||
2003-05-14 Garvin Hicking <me@supergarv.de>
|
||||
* lang/german*: Translations.
|
||||
* pdf_schema.php3: Merged patch #736999 (fixes Bug #728789 and
|
||||
better fix for #624712), by Maxime Delorme. Thanks!
|
||||
|
||||
2003-05-13 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/sqlparser.data.php3: bug 736793, new reserved
|
||||
|
@@ -634,14 +634,10 @@ class PMA_RT_Table
|
||||
*
|
||||
* @see PMA_PDF
|
||||
*/
|
||||
function PMA_RT_Table_draw($show_info, $ff, $same_wide = 0, $same_wide_width = 0)
|
||||
function PMA_RT_Table_draw($show_info, $ff)
|
||||
{
|
||||
global $pdf, $with_doc;
|
||||
|
||||
if ($same_wide == 1 && $same_wide_width > 0) {
|
||||
$this->width = $same_wide_width;
|
||||
}
|
||||
|
||||
$pdf->PMA_PDF_setXyScale($this->x, $this->y);
|
||||
$pdf->SetFont($ff, 'B');
|
||||
$pdf->SetTextColor(200);
|
||||
@@ -785,18 +781,11 @@ class PMA_RT_Relation
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
function PMA_RT_Relation_getXy($table, $column, $same_wide, $tablewidth)
|
||||
function PMA_RT_Relation_getXy($table, $column)
|
||||
{
|
||||
$pos = array_search($column, $table->fields);
|
||||
|
||||
if($same_wide) {
|
||||
$width = $tablewidth;
|
||||
} else {
|
||||
$width = $table->width;
|
||||
}
|
||||
|
||||
// x_left, x_right, y
|
||||
return array($table->x, $table->x + $width, $table->y + ($pos + 1.5) * $table->height_cell);
|
||||
return array($table->x, $table->x + + $table->width, $table->y + ($pos + 1.5) * $table->height_cell);
|
||||
} // end of the "PMA_RT_Relation_getXy()" method
|
||||
|
||||
|
||||
@@ -866,10 +855,10 @@ class PMA_RT_Relation
|
||||
*
|
||||
* @see PMA_RT_Relation::PMA_RT_Relation_getXy
|
||||
*/
|
||||
function PMA_RT_Relation($master_table, $master_field, $foreign_table, $foreign_field, $same_wide, $tablewidth)
|
||||
function PMA_RT_Relation($master_table, $master_field, $foreign_table, $foreign_field)
|
||||
{
|
||||
$src_pos = $this->PMA_RT_Relation_getXy($master_table , $master_field, $same_wide, $tablewidth);
|
||||
$dest_pos = $this->PMA_RT_Relation_getXy($foreign_table, $foreign_field, $same_wide, $tablewidth);
|
||||
$src_pos = $this->PMA_RT_Relation_getXy($master_table , $master_field);
|
||||
$dest_pos = $this->PMA_RT_Relation_getXy($foreign_table, $foreign_field);
|
||||
$src_left = $src_pos[0] - $this->w_tick;
|
||||
$src_right = $src_pos[1] + $this->w_tick;
|
||||
$dest_left = $dest_pos[0] - $this->w_tick;
|
||||
@@ -974,7 +963,7 @@ class PMA_RT
|
||||
$this->tables[$foreign_table] = new PMA_RT_Table($foreign_table, $this->ff, $this->tablewidth);
|
||||
$this->PMA_RT_setMinMax($this->tables[$foreign_table]);
|
||||
}
|
||||
$this->relations[] = new PMA_RT_Relation($this->tables[$master_table], $master_field, $this->tables[$foreign_table], $foreign_field, $this->same_wide, $this->tablewidth);
|
||||
$this->relations[] = new PMA_RT_Relation($this->tables[$master_table], $master_field, $this->tables[$foreign_table], $foreign_field);
|
||||
} // end of the "PMA_RT_addRelation()" method
|
||||
|
||||
|
||||
@@ -1048,7 +1037,7 @@ class PMA_RT
|
||||
{
|
||||
reset($this->tables);
|
||||
while (list(, $table) = each($this->tables)) {
|
||||
$table->PMA_RT_Table_draw($show_info, $this->ff, $this->same_wide, $this->tablewidth);
|
||||
$table->PMA_RT_Table_draw($show_info, $this->ff);
|
||||
}
|
||||
} // end of the "PMA_RT_drawTables()" method
|
||||
|
||||
@@ -1108,7 +1097,7 @@ class PMA_RT
|
||||
*
|
||||
* @see PMA_PDF
|
||||
*/
|
||||
function PMA_RT($scale, $which_rel, $show_info = 0, $change_color = 0 , $show_grid = 0, $all_tab_same_wide = 0, $orientation = 'L')
|
||||
function PMA_RT( $which_rel, $show_info = 0, $change_color = 0 , $show_grid = 0, $all_tab_same_wide = 0, $orientation = 'L')
|
||||
{
|
||||
global $pdf, $db, $cfgRelation, $with_doc;
|
||||
|
||||
@@ -1174,18 +1163,19 @@ class PMA_RT
|
||||
while (list(, $table) = each ($alltables)) {
|
||||
if (!isset($this->tables[$table])) {
|
||||
$this->tables[$table] = new PMA_RT_Table($table, $this->ff, $this->tablewidth);
|
||||
$this->PMA_RT_setMinMax($this->tables[$table]);
|
||||
}
|
||||
} // while
|
||||
|
||||
reset($alltables);
|
||||
while (list(, $table) = each ($alltables)) {
|
||||
if($this->same_wide){
|
||||
$this->tables[$table]->width = $this->tablewidth;
|
||||
}
|
||||
$this->PMA_RT_setMinMax($this->tables[$table]);
|
||||
}
|
||||
// Defines the scale factor
|
||||
if ($scale == 'auto') {
|
||||
$this->scale = ceil(max(($this->x_max - $this->x_min) / (297 - $this->r_marg - $this->l_marg), ($this->y_max - $this->y_min) / (210 - $this->t_marg - $this->b_marg)) * 100) / 100;
|
||||
$pdf->PMA_PDF_setScale($this->scale, $this->x_min, $this->y_min, $this->l_marg, $this->t_marg);
|
||||
} else {
|
||||
$this->scale = $scale;
|
||||
$pdf->PMA_PDF_setScale($scale);
|
||||
} // end if... else...
|
||||
|
||||
|
||||
// Builds and save the PDF document
|
||||
$pdf->PMA_PDF_setLineWidthScale(0.1);
|
||||
@@ -1196,7 +1186,6 @@ class PMA_RT
|
||||
}
|
||||
$pdf->PMA_PDF_setFontSizeScale(14);
|
||||
|
||||
$this->PMA_RT_drawTables($show_info);
|
||||
|
||||
/* start snip */
|
||||
|
||||
@@ -1221,6 +1210,7 @@ class PMA_RT
|
||||
if ($norelations == FALSE) {
|
||||
$this->PMA_RT_drawRelations($change_color);
|
||||
}
|
||||
$this->PMA_RT_drawTables($show_info);
|
||||
|
||||
$this->PMA_RT_showRt();
|
||||
} // end of the "PMA_RT()" method
|
||||
@@ -1539,5 +1529,5 @@ $with_doc = (isset($with_doc) && $with_doc == 'on') ? 1 : 0;
|
||||
$orientation = (isset($orientation) && $orientation == 'P') ? 'P' : 'L';
|
||||
PMA_mysql_select_db($db);
|
||||
|
||||
$rt = new PMA_RT('auto', $pdf_page_number, $show_table_dimension, $show_color, $show_grid, $all_tab_same_wide, $orientation);
|
||||
$rt = new PMA_RT($pdf_page_number, $show_table_dimension, $show_color, $show_grid, $all_tab_same_wide, $orientation);
|
||||
?>
|
||||
|
Reference in New Issue
Block a user