diff --git a/libraries/classes/Plugins/Schema/Eps/EpsRelationSchema.php b/libraries/classes/Plugins/Schema/Eps/EpsRelationSchema.php index 46f1098982..0848fd0049 100644 --- a/libraries/classes/Plugins/Schema/Eps/EpsRelationSchema.php +++ b/libraries/classes/Plugins/Schema/Eps/EpsRelationSchema.php @@ -14,6 +14,7 @@ use PhpMyAdmin\Version; use function __; use function date; use function in_array; +use function max; use function sprintf; /** @@ -78,11 +79,11 @@ class EpsRelationSchema extends ExportRelationSchema $this->diagram->getFont(), $this->diagram->getFontSize(), $this->pageNumber, - $this->tablewidth, $this->showKeys, $this->tableDimension, $this->offline, ); + $this->tablewidth = max($this->tablewidth, $this->tables[$table]->width); } if (! $this->sameWide) { @@ -188,10 +189,10 @@ class EpsRelationSchema extends ExportRelationSchema $font, $fontSize, $this->pageNumber, - $this->tablewidth, false, $tableDimension, ); + $this->tablewidth = max($this->tablewidth, $this->tables[$masterTable]->width); } if (! isset($this->tables[$foreignTable])) { @@ -202,10 +203,10 @@ class EpsRelationSchema extends ExportRelationSchema $font, $fontSize, $this->pageNumber, - $this->tablewidth, false, $tableDimension, ); + $this->tablewidth = max($this->tablewidth, $this->tables[$foreignTable]->width); } $this->relations[] = new RelationStatsEps( diff --git a/libraries/classes/Plugins/Schema/Eps/TableStatsEps.php b/libraries/classes/Plugins/Schema/Eps/TableStatsEps.php index 42c024ea64..fddd4b8e95 100644 --- a/libraries/classes/Plugins/Schema/Eps/TableStatsEps.php +++ b/libraries/classes/Plugins/Schema/Eps/TableStatsEps.php @@ -36,17 +36,16 @@ class TableStatsEps extends TableStats * @see TableStatsEps::setWidthTable * @see TableStatsEps::setHeightTable * - * @param Eps $diagram The EPS diagram - * @param string $db The database name - * @param string $tableName The table name - * @param string $font The font name - * @param int $fontSize The font size - * @param int $pageNumber Page number - * @param int|float $same_wide_width The max width among tables - * @param bool $showKeys Whether to display keys or not - * @param bool $tableDimension Whether to display table position or not - * @param bool $offline Whether the coordinates are sent - * from the browser + * @param Eps $diagram The EPS diagram + * @param string $db The database name + * @param string $tableName The table name + * @param string $font The font name + * @param int $fontSize The font size + * @param int $pageNumber Page number + * @param bool $showKeys Whether to display keys or not + * @param bool $tableDimension Whether to display table position or not + * @param bool $offline Whether the coordinates are sent + * from the browser */ public function __construct( $diagram, @@ -55,7 +54,6 @@ class TableStatsEps extends TableStats $font, $fontSize, $pageNumber, - &$same_wide_width, $showKeys = false, $tableDimension = false, $offline = false, @@ -67,11 +65,6 @@ class TableStatsEps extends TableStats // setWidth must me after setHeight, because title // can include table height which changes table width $this->setWidthTable($font, $fontSize); - if ($same_wide_width >= $this->width) { - return; - } - - $same_wide_width = $this->width; } /** diff --git a/libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php b/libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php index 51bdf14ff4..5f46a714b8 100644 --- a/libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php +++ b/libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php @@ -89,11 +89,11 @@ class SvgRelationSchema extends ExportRelationSchema $this->diagram->getFont(), $this->diagram->getFontSize(), $this->pageNumber, - $this->tablewidth, $this->showKeys, $this->tableDimension, $this->offline, ); + $this->tablewidth = max($this->tablewidth, $this->tables[$table]->width); } if ($this->sameWide) { @@ -219,10 +219,10 @@ class SvgRelationSchema extends ExportRelationSchema $font, $fontSize, $this->pageNumber, - $this->tablewidth, false, $tableDimension, ); + $this->tablewidth = max($this->tablewidth, $this->tables[$masterTable]->width); $this->setMinMax($this->tables[$masterTable]); } @@ -234,10 +234,10 @@ class SvgRelationSchema extends ExportRelationSchema $font, $fontSize, $this->pageNumber, - $this->tablewidth, false, $tableDimension, ); + $this->tablewidth = max($this->tablewidth, $this->tables[$foreignTable]->width); $this->setMinMax($this->tables[$foreignTable]); } diff --git a/libraries/classes/Plugins/Schema/Svg/TableStatsSvg.php b/libraries/classes/Plugins/Schema/Svg/TableStatsSvg.php index ca858807ab..c322347ef6 100644 --- a/libraries/classes/Plugins/Schema/Svg/TableStatsSvg.php +++ b/libraries/classes/Plugins/Schema/Svg/TableStatsSvg.php @@ -37,16 +37,15 @@ class TableStatsSvg extends TableStats * @see TableStatsSvg::setWidthTable * @see TableStatsSvg::setHeightTable * - * @param Svg $diagram The current SVG image document - * @param string $db The database name - * @param string $tableName The table name - * @param string $font Font face - * @param int $fontSize The font size - * @param int $pageNumber Page number - * @param int|float $same_wide_width The max. width among tables - * @param bool $showKeys Whether to display keys or not - * @param bool $tableDimension Whether to display table position or not - * @param bool $offline Whether the coordinates are sent + * @param Svg $diagram The current SVG image document + * @param string $db The database name + * @param string $tableName The table name + * @param string $font Font face + * @param int $fontSize The font size + * @param int $pageNumber Page number + * @param bool $showKeys Whether to display keys or not + * @param bool $tableDimension Whether to display table position or not + * @param bool $offline Whether the coordinates are sent */ public function __construct( $diagram, @@ -55,7 +54,6 @@ class TableStatsSvg extends TableStats $font, $fontSize, $pageNumber, - &$same_wide_width, $showKeys = false, $tableDimension = false, $offline = false, @@ -67,11 +65,6 @@ class TableStatsSvg extends TableStats // setWidth must me after setHeight, because title // can include table height which changes table width $this->setWidthTable($font, $fontSize); - if ($same_wide_width >= $this->width) { - return; - } - - $same_wide_width = $this->width; } /**