From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- .../classes/Plugins/Schema/RelationStats.php | 120 --------------------- 1 file changed, 120 deletions(-) delete mode 100644 srcs/phpmyadmin/libraries/classes/Plugins/Schema/RelationStats.php (limited to 'srcs/phpmyadmin/libraries/classes/Plugins/Schema/RelationStats.php') diff --git a/srcs/phpmyadmin/libraries/classes/Plugins/Schema/RelationStats.php b/srcs/phpmyadmin/libraries/classes/Plugins/Schema/RelationStats.php deleted file mode 100644 index 848fbf4..0000000 --- a/srcs/phpmyadmin/libraries/classes/Plugins/Schema/RelationStats.php +++ /dev/null @@ -1,120 +0,0 @@ -diagram = $diagram; - - $src_pos = $this->_getXy($master_table, $master_field); - $dest_pos = $this->_getXy($foreign_table, $foreign_field); - /* - * [0] is x-left - * [1] is x-right - * [2] is y - */ - $src_left = $src_pos[0] - $this->wTick; - $src_right = $src_pos[1] + $this->wTick; - $dest_left = $dest_pos[0] - $this->wTick; - $dest_right = $dest_pos[1] + $this->wTick; - - $d1 = abs($src_left - $dest_left); - $d2 = abs($src_right - $dest_left); - $d3 = abs($src_left - $dest_right); - $d4 = abs($src_right - $dest_right); - $d = min($d1, $d2, $d3, $d4); - - if ($d == $d1) { - $this->xSrc = $src_pos[0]; - $this->srcDir = -1; - $this->xDest = $dest_pos[0]; - $this->destDir = -1; - } elseif ($d == $d2) { - $this->xSrc = $src_pos[1]; - $this->srcDir = 1; - $this->xDest = $dest_pos[0]; - $this->destDir = -1; - } elseif ($d == $d3) { - $this->xSrc = $src_pos[0]; - $this->srcDir = -1; - $this->xDest = $dest_pos[1]; - $this->destDir = 1; - } else { - $this->xSrc = $src_pos[1]; - $this->srcDir = 1; - $this->xDest = $dest_pos[1]; - $this->destDir = 1; - } - $this->ySrc = $src_pos[2]; - $this->yDest = $dest_pos[2]; - } - - /** - * Gets arrows coordinates - * - * @param TableStats $table The table - * @param string $column The relation column name - * - * @return array Arrows coordinates - * - * @access private - */ - private function _getXy($table, $column) - { - $pos = array_search($column, $table->fields); - - // x_left, x_right, y - return [ - $table->x, - $table->x + $table->width, - $table->y + ($pos + 1.5) * $table->heightCell, - ]; - } -} -- cgit