The branch, master has been updated
via 968f1f9d2da9bfcfcd7c8119222f9ebf5eba011b (commit)
via a78fc120480240f8bbd7492b250215530978c396 (commit)
from a5c73c5a9a9eb6e18b7aa1f9a3fe429ed80a05b8 (commit)
- Log -----------------------------------------------------------------
commit 968f1f9d2da9bfcfcd7c8119222f9ebf5eba011b
Merge: a5c73c5a9a9eb6e18b7aa1f9a3fe429ed80a05b8 a78fc120480240f8bbd7492b250215530978c396
Author: Michal Čihař <mcihar(a)novell.com>
Date: Tue Mar 30 13:27:16 2010 +0200
Merge branch 'QA_3_3'
-----------------------------------------------------------------------
Summary of changes:
libraries/Table.class.php | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libraries/Table.class.php b/libraries/Table.class.php
index 9e80660..81184a9 100644
--- a/libraries/Table.class.php
+++ b/libraries/Table.class.php
@@ -248,7 +248,7 @@ class PMA_Table
* @return boolean true if it is a merge table
* @access public
*/
- public function isMerge($db = null, $table = null)
+ static public function isMerge($db = null, $table = null)
{
// if called static, with parameters
if (! empty($db) && ! empty($table)) {
hooks/post-receive
--
phpMyAdmin
The branch, QA_3_3 has been updated
via a78fc120480240f8bbd7492b250215530978c396 (commit)
from a4ca1638e95cb7892c878394440a103d015be6fa (commit)
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
libraries/Table.class.php | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libraries/Table.class.php b/libraries/Table.class.php
index de2cfe2..ceed355 100644
--- a/libraries/Table.class.php
+++ b/libraries/Table.class.php
@@ -248,7 +248,7 @@ class PMA_Table
* @return boolean true if it is a merge table
* @access public
*/
- public function isMerge($db = null, $table = null)
+ static public function isMerge($db = null, $table = null)
{
// if called static, with parameters
if (! empty($db) && ! empty($table)) {
hooks/post-receive
--
phpMyAdmin
The branch, master has been updated
via a5c73c5a9a9eb6e18b7aa1f9a3fe429ed80a05b8 (commit)
via a4ca1638e95cb7892c878394440a103d015be6fa (commit)
from e68305febd52c7d357a02d21b273423887d2783f (commit)
- Log -----------------------------------------------------------------
commit a5c73c5a9a9eb6e18b7aa1f9a3fe429ed80a05b8
Merge: e68305febd52c7d357a02d21b273423887d2783f a4ca1638e95cb7892c878394440a103d015be6fa
Author: Michal Čihař <mcihar(a)novell.com>
Date: Tue Mar 30 13:06:53 2010 +0200
Merge branch 'QA_3_3'
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
pdf_schema.php | 56 ++++++++++++++++++++++++++++++++++++--------------------
2 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7a1717f..b1243f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -69,6 +69,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #2972232 [menu] Import menu tab not present on main page
- patch #2976790 [menu] Go to the upper level after table DROP,
thanks to Kaarel Nummert - kaarelnu
+- patch #2978815 [pdf] Fix generating PDF with table dimensions, thanks to BlinK_
3.3.1.0 (2010-03-16)
- bug #2941037 [core] Database structure not sorted by table correctly
diff --git a/pdf_schema.php b/pdf_schema.php
index 1e81c3b..99a9b33 100644
--- a/pdf_schema.php
+++ b/pdf_schema.php
@@ -510,8 +510,19 @@ class PMA_RT_Table {
var $height_cell = 6;
var $x, $y;
var $primary = array();
+ var $show_info = false;
/**
+ * Returns title of the current table,
+ * title can have the dimensions of the table
+ *
+ * @access private
+ */
+ function getTitle()
+ {
+ return ($this->show_info ? sprintf('%.0f', $this->width) . 'x' . sprintf('%.0f', $this->height) : '') . ' ' . $this->table_name;
+ } // end of the "getTitle" function
+ /**
* Sets the width of the table
*
* @param integer $ The font size
@@ -521,8 +532,6 @@ class PMA_RT_Table {
*/
function PMA_RT_Table_setWidth($ff)
{
- // this looks buggy to me... does it really work if
- // there are fields that require wider cells than the name of the table?
global $pdf;
foreach ($this->fields AS $field) {
@@ -530,7 +539,11 @@ class PMA_RT_Table {
}
$this->width += $pdf->GetStringWidth(' ');
$pdf->SetFont($ff, 'B');
- $this->width = max($this->width, $pdf->GetStringWidth(' ' . $this->table_name));
+ // it is unknown what value must be added, because
+ // table title is affected by the tabe width value
+ while ($this->width < $pdf->GetStringWidth($this->getTitle())) {
+ $this->width += 5;
+ }
$pdf->SetFont($ff, '');
} // end of the "PMA_RT_Table_setWidth()" method
/**
@@ -545,7 +558,6 @@ class PMA_RT_Table {
/**
* Do draw the table
*
- * @param boolean $ Whether to display table position or not
* @param integer $ The font size
* @param boolean $ Whether to display color
* @param integer $ The max. with among tables
@@ -553,7 +565,7 @@ class PMA_RT_Table {
* @access private
* @see PMA_PDF
*/
- function PMA_RT_Table_draw($show_info, $ff, $setcolor = 0)
+ function PMA_RT_Table_draw($ff, $setcolor = 0)
{
global $pdf, $with_doc;
@@ -569,11 +581,7 @@ class PMA_RT_Table {
$pdf->PMA_links['doc'][$this->table_name]['-'] = '';
}
- if ($show_info) {
- $pdf->PMA_PDF_cellScale($this->width, $this->height_cell, sprintf('%.0f', $this->width) . 'x' . sprintf('%.0f', $this->height) . ' ' . $this->table_name, 1, 1, 'C', $setcolor, $pdf->PMA_links['doc'][$this->table_name]['-']);
- } else {
- $pdf->PMA_PDF_cellScale($this->width, $this->height_cell, $this->table_name, 1, 1, 'C', $setcolor, $pdf->PMA_links['doc'][$this->table_name]['-']);
- }
+ $pdf->PMA_PDF_cellScale($this->width, $this->height_cell, $this->getTitle(), 1, 1, 'C', $setcolor, $pdf->PMA_links['doc'][$this->table_name]['-']);
$pdf->PMA_PDF_setXScale($this->x);
$pdf->SetFont($ff, '');
$pdf->SetTextColor(0);
@@ -608,6 +616,8 @@ class PMA_RT_Table {
* @param string $ The table name
* @param integer $ The font size
* @param integer $ The max. with among tables
+ * @param boolean $ Whether to display keys or not
+ * @param boolean $ Whether to display table position or not
* @global object The current PDF document
* @global integer The current page number (from the
* $cfg['Servers'][$i]['table_coords'] table)
@@ -617,7 +627,7 @@ class PMA_RT_Table {
* @see PMA_PDF, PMA_RT_Table::PMA_RT_Table_setWidth,
PMA_RT_Table::PMA_RT_Table_setHeight
*/
- function __construct($table_name, $ff, &$same_wide_width, $show_keys)
+ function __construct($table_name, $ff, &$same_wide_width, $show_keys = false, $show_info = false)
{
global $pdf, $pdf_page_number, $cfgRelation, $db;
@@ -641,9 +651,14 @@ class PMA_RT_Table {
$this->fields[] = $row[0];
}
}
+
+ $this->show_info = $show_info;
+
// height and width
- $this->PMA_RT_Table_setWidth($ff);
$this->PMA_RT_Table_setHeight();
+ // setWidth must me after setHeight, because title
+ // can include table height which changes table width
+ $this->PMA_RT_Table_setWidth($ff);
if ($same_wide_width < $this->width) {
$same_wide_width = $this->width;
}
@@ -847,17 +862,18 @@ class PMA_RT {
* @param string $ The relation field in the master table
* @param string $ The foreign table name
* @param string $ The relation field in the foreign table
+ * @param boolean $ Whether to display table position or not
* @access private
* @see PMA_RT_setMinMax
*/
- function PMA_RT_addRelation($master_table, $master_field, $foreign_table, $foreign_field)
+ function PMA_RT_addRelation($master_table, $master_field, $foreign_table, $foreign_field, $show_info)
{
if (!isset($this->tables[$master_table])) {
- $this->tables[$master_table] = new PMA_RT_Table($master_table, $this->ff, $this->tablewidth);
+ $this->tables[$master_table] = new PMA_RT_Table($master_table, $this->ff, $this->tablewidth, false, $show_info);
$this->PMA_RT_setMinMax($this->tables[$master_table]);
}
if (!isset($this->tables[$foreign_table])) {
- $this->tables[$foreign_table] = new PMA_RT_Table($foreign_table, $this->ff, $this->tablewidth);
+ $this->tables[$foreign_table] = new PMA_RT_Table($foreign_table, $this->ff, $this->tablewidth, false, $show_info);
$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);
@@ -915,10 +931,10 @@ class PMA_RT {
* @access private
* @see PMA_RT_Table::PMA_RT_Table_draw()
*/
- function PMA_RT_drawTables($show_info, $draw_color = 0)
+ function PMA_RT_drawTables($draw_color = 0)
{
foreach ($this->tables AS $table) {
- $table->PMA_RT_Table_draw($show_info, $this->ff, $draw_color);
+ $table->PMA_RT_Table_draw($this->ff, $draw_color);
}
} // end of the "PMA_RT_drawTables()" method
/**
@@ -1026,7 +1042,7 @@ class PMA_RT {
foreach ($alltables AS $table) {
if (!isset($this->tables[$table])) {
- $this->tables[$table] = new PMA_RT_Table($table, $this->ff, $this->tablewidth, $show_keys);
+ $this->tables[$table] = new PMA_RT_Table($table, $this->ff, $this->tablewidth, $show_keys, $show_info);
}
if ($this->same_wide) {
@@ -1071,7 +1087,7 @@ class PMA_RT {
// (do not use array_search() because we would have to
// to do a === FALSE and this is not PHP3 compatible)
if (in_array($rel['foreign_table'], $alltables)) {
- $this->PMA_RT_addRelation($one_table, $master_field, $rel['foreign_table'], $rel['foreign_field']);
+ $this->PMA_RT_addRelation($one_table, $master_field, $rel['foreign_table'], $rel['foreign_field'], $show_info);
}
} // end while
} // end if
@@ -1089,7 +1105,7 @@ class PMA_RT {
$this->PMA_RT_drawRelations($change_color);
}
- $this->PMA_RT_drawTables($show_info, $change_color);
+ $this->PMA_RT_drawTables($change_color);
$this->PMA_RT_showRt();
} // end of the "PMA_RT()" method
hooks/post-receive
--
phpMyAdmin
The branch, QA_3_3 has been updated
via a4ca1638e95cb7892c878394440a103d015be6fa (commit)
from 589504fe8a423b794797f72cf61b60fc8b770b3e (commit)
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
pdf_schema.php | 56 ++++++++++++++++++++++++++++++++++++--------------------
2 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 807fe76..f4da7a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #2972232 [menu] Import menu tab not present on main page
- patch #2976790 [menu] Go to the upper level after table DROP,
thanks to Kaarel Nummert - kaarelnu
+- patch #2978815 [pdf] Fix generating PDF with table dimensions, thanks to BlinK_
3.3.1.0 (2010-03-16)
- bug #2941037 [core] Database structure not sorted by table correctly
diff --git a/pdf_schema.php b/pdf_schema.php
index 82a07c1..086301a 100644
--- a/pdf_schema.php
+++ b/pdf_schema.php
@@ -511,8 +511,19 @@ class PMA_RT_Table {
var $height_cell = 6;
var $x, $y;
var $primary = array();
+ var $show_info = false;
/**
+ * Returns title of the current table,
+ * title can have the dimensions of the table
+ *
+ * @access private
+ */
+ function getTitle()
+ {
+ return ($this->show_info ? sprintf('%.0f', $this->width) . 'x' . sprintf('%.0f', $this->height) : '') . ' ' . $this->table_name;
+ } // end of the "getTitle" function
+ /**
* Sets the width of the table
*
* @param integer $ The font size
@@ -522,8 +533,6 @@ class PMA_RT_Table {
*/
function PMA_RT_Table_setWidth($ff)
{
- // this looks buggy to me... does it really work if
- // there are fields that require wider cells than the name of the table?
global $pdf;
foreach ($this->fields AS $field) {
@@ -531,7 +540,11 @@ class PMA_RT_Table {
}
$this->width += $pdf->GetStringWidth(' ');
$pdf->SetFont($ff, 'B');
- $this->width = max($this->width, $pdf->GetStringWidth(' ' . $this->table_name));
+ // it is unknown what value must be added, because
+ // table title is affected by the tabe width value
+ while ($this->width < $pdf->GetStringWidth($this->getTitle())) {
+ $this->width += 5;
+ }
$pdf->SetFont($ff, '');
} // end of the "PMA_RT_Table_setWidth()" method
/**
@@ -546,7 +559,6 @@ class PMA_RT_Table {
/**
* Do draw the table
*
- * @param boolean $ Whether to display table position or not
* @param integer $ The font size
* @param boolean $ Whether to display color
* @param integer $ The max. with among tables
@@ -554,7 +566,7 @@ class PMA_RT_Table {
* @access private
* @see PMA_PDF
*/
- function PMA_RT_Table_draw($show_info, $ff, $setcolor = 0)
+ function PMA_RT_Table_draw($ff, $setcolor = 0)
{
global $pdf, $with_doc;
@@ -570,11 +582,7 @@ class PMA_RT_Table {
$pdf->PMA_links['doc'][$this->table_name]['-'] = '';
}
- if ($show_info) {
- $pdf->PMA_PDF_cellScale($this->width, $this->height_cell, sprintf('%.0f', $this->width) . 'x' . sprintf('%.0f', $this->height) . ' ' . $this->table_name, 1, 1, 'C', $setcolor, $pdf->PMA_links['doc'][$this->table_name]['-']);
- } else {
- $pdf->PMA_PDF_cellScale($this->width, $this->height_cell, $this->table_name, 1, 1, 'C', $setcolor, $pdf->PMA_links['doc'][$this->table_name]['-']);
- }
+ $pdf->PMA_PDF_cellScale($this->width, $this->height_cell, $this->getTitle(), 1, 1, 'C', $setcolor, $pdf->PMA_links['doc'][$this->table_name]['-']);
$pdf->PMA_PDF_setXScale($this->x);
$pdf->SetFont($ff, '');
$pdf->SetTextColor(0);
@@ -611,6 +619,8 @@ class PMA_RT_Table {
* @param string $ The table name
* @param integer $ The font size
* @param integer $ The max. with among tables
+ * @param boolean $ Whether to display keys or not
+ * @param boolean $ Whether to display table position or not
* @global object The current PDF document
* @global integer The current page number (from the
* $cfg['Servers'][$i]['table_coords'] table)
@@ -620,7 +630,7 @@ class PMA_RT_Table {
* @see PMA_PDF, PMA_RT_Table::PMA_RT_Table_setWidth,
PMA_RT_Table::PMA_RT_Table_setHeight
*/
- function __construct($table_name, $ff, &$same_wide_width, $show_keys)
+ function __construct($table_name, $ff, &$same_wide_width, $show_keys = false, $show_info = false)
{
global $pdf, $pdf_page_number, $cfgRelation, $db;
@@ -644,9 +654,14 @@ class PMA_RT_Table {
$this->fields[] = $row[0];
}
}
+
+ $this->show_info = $show_info;
+
// height and width
- $this->PMA_RT_Table_setWidth($ff);
$this->PMA_RT_Table_setHeight();
+ // setWidth must me after setHeight, because title
+ // can include table height which changes table width
+ $this->PMA_RT_Table_setWidth($ff);
if ($same_wide_width < $this->width) {
$same_wide_width = $this->width;
}
@@ -850,17 +865,18 @@ class PMA_RT {
* @param string $ The relation field in the master table
* @param string $ The foreign table name
* @param string $ The relation field in the foreign table
+ * @param boolean $ Whether to display table position or not
* @access private
* @see PMA_RT_setMinMax
*/
- function PMA_RT_addRelation($master_table, $master_field, $foreign_table, $foreign_field)
+ function PMA_RT_addRelation($master_table, $master_field, $foreign_table, $foreign_field, $show_info)
{
if (!isset($this->tables[$master_table])) {
- $this->tables[$master_table] = new PMA_RT_Table($master_table, $this->ff, $this->tablewidth);
+ $this->tables[$master_table] = new PMA_RT_Table($master_table, $this->ff, $this->tablewidth, false, $show_info);
$this->PMA_RT_setMinMax($this->tables[$master_table]);
}
if (!isset($this->tables[$foreign_table])) {
- $this->tables[$foreign_table] = new PMA_RT_Table($foreign_table, $this->ff, $this->tablewidth);
+ $this->tables[$foreign_table] = new PMA_RT_Table($foreign_table, $this->ff, $this->tablewidth, false, $show_info);
$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);
@@ -918,10 +934,10 @@ class PMA_RT {
* @access private
* @see PMA_RT_Table::PMA_RT_Table_draw()
*/
- function PMA_RT_drawTables($show_info, $draw_color = 0)
+ function PMA_RT_drawTables($draw_color = 0)
{
foreach ($this->tables AS $table) {
- $table->PMA_RT_Table_draw($show_info, $this->ff, $draw_color);
+ $table->PMA_RT_Table_draw($this->ff, $draw_color);
}
} // end of the "PMA_RT_drawTables()" method
/**
@@ -1029,7 +1045,7 @@ class PMA_RT {
foreach ($alltables AS $table) {
if (!isset($this->tables[$table])) {
- $this->tables[$table] = new PMA_RT_Table($table, $this->ff, $this->tablewidth, $show_keys);
+ $this->tables[$table] = new PMA_RT_Table($table, $this->ff, $this->tablewidth, $show_keys, $show_info);
}
if ($this->same_wide) {
@@ -1075,7 +1091,7 @@ class PMA_RT {
// (do not use array_search() because we would have to
// to do a === FALSE and this is not PHP3 compatible)
if (in_array($rel['foreign_table'], $alltables)) {
- $this->PMA_RT_addRelation($one_table, $master_field, $rel['foreign_table'], $rel['foreign_field']);
+ $this->PMA_RT_addRelation($one_table, $master_field, $rel['foreign_table'], $rel['foreign_field'], $show_info);
}
} // end while
} // end if
@@ -1093,7 +1109,7 @@ class PMA_RT {
$this->PMA_RT_drawRelations($change_color);
}
- $this->PMA_RT_drawTables($show_info, $change_color);
+ $this->PMA_RT_drawTables($change_color);
$this->PMA_RT_showRt();
} // end of the "PMA_RT()" method
hooks/post-receive
--
phpMyAdmin
The branch, gettext has been deleted
was 9a26625560c3bcbeb0169bff625f09bcc8bcfe46
-----------------------------------------------------------------------
9a26625560c3bcbeb0169bff625f09bcc8bcfe46 Merge branch 'master' into gettext
-----------------------------------------------------------------------
hooks/post-receive
--
phpMyAdmin
The branch, master has been updated
via e6908a5c24550625f8622a7fafe2daccc887d5ae (commit)
from a24c6574bcdb49e671470e8b2cfbf41eda0951bd (commit)
- Log -----------------------------------------------------------------
commit e6908a5c24550625f8622a7fafe2daccc887d5ae
Author: Michal Čihař <mcihar(a)novell.com>
Date: Tue Mar 30 10:34:16 2010 +0200
Mention master document.
-----------------------------------------------------------------------
Summary of changes:
README | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/README b/README
index 51d7123..ab47b57 100644
--- a/README
+++ b/README
@@ -1,7 +1,8 @@
phpMyAdmin - localized documentation
====================================
-This repository contains localized documentation for phpMyAdmin.
+This repository contains localized documentation for phpMyAdmin. It
+is based on master document placed in phpmyadmin repository.
To translate edit your language file in po directory, changes will be
propagated to generated documents. You can also translate online at
hooks/post-receive
--
phpMyAdmin localized documentation