diff --git a/libraries/Index.php b/libraries/Index.php index 269b448eb5..c6c814aab0 100644 --- a/libraries/Index.php +++ b/libraries/Index.php @@ -634,6 +634,39 @@ class Index return $this->_columns; } + /** + * Get HTML for display indexes + * + * @return string $html_output + */ + public static function getHtmlForDisplayIndexes() + { + $html_output = '
'; + $html_output .= self::getHtmlForIndexes( + $GLOBALS['table'], + $GLOBALS['db'] + ); + $html_output .= '' + . '
'; + + return $html_output; + } + /** * Show index data * diff --git a/libraries/controllers/table/TableRelationController.php b/libraries/controllers/table/TableRelationController.php index 163c2d74eb..39b7cd7662 100644 --- a/libraries/controllers/table/TableRelationController.php +++ b/libraries/controllers/table/TableRelationController.php @@ -8,8 +8,6 @@ namespace PMA\libraries\controllers\table; -require_once 'libraries/index.lib.php'; - use PMA\libraries\controllers\TableController; use PMA\libraries\DatabaseInterface; use PMA\libraries\Index; @@ -191,7 +189,7 @@ class TableRelationController extends TableController ); if (Util::isForeignKeySupported($this->tbl_storage_engine)) { - $this->response->addHTML(PMA_getHtmlForDisplayIndexes()); + $this->response->addHTML(Index::getHtmlForDisplayIndexes()); } $this->response->addHTML(''); } diff --git a/libraries/controllers/table/TableStructureController.php b/libraries/controllers/table/TableStructureController.php index b213ad2a35..6377c38783 100644 --- a/libraries/controllers/table/TableStructureController.php +++ b/libraries/controllers/table/TableStructureController.php @@ -118,7 +118,6 @@ class TableStructureController extends TableController * Function implementations for this script */ include_once 'libraries/check_user_privileges.lib.php'; - include_once 'libraries/index.lib.php'; $this->response->getHeader()->getScripts()->addFiles( array( diff --git a/libraries/index.lib.php b/libraries/index.lib.php deleted file mode 100644 index de1d76da31..0000000000 --- a/libraries/index.lib.php +++ /dev/null @@ -1,41 +0,0 @@ -'; - $html_output .= PMA\libraries\Index::getHtmlForIndexes( - $GLOBALS['table'], - $GLOBALS['db'] - ); - $html_output .= '' - . ''; - - return $html_output; -} diff --git a/templates/table/structure/display_structure.phtml b/templates/table/structure/display_structure.phtml index e441d428b5..bb36efd06a 100644 --- a/templates/table/structure/display_structure.phtml +++ b/templates/table/structure/display_structure.phtml @@ -1,4 +1,5 @@ - +