From 75bcf1fc623600541f244ec72032d968b2fc53fe Mon Sep 17 00:00:00 2001 From: Mohamed Ashraf Date: Thu, 21 Mar 2013 14:35:22 +0200 Subject: [PATCH] moved the method PMA_getHtmlForDisplayIndexes to the index.lib.php file --- libraries/index.lib.php | 44 +++++++++++++++++++++++++++++++++++++ libraries/structure.lib.php | 30 ------------------------- tbl_structure.php | 1 + 3 files changed, 45 insertions(+), 30 deletions(-) create mode 100644 libraries/index.lib.php diff --git a/libraries/index.lib.php b/libraries/index.lib.php new file mode 100644 index 0000000000..ac45bb2004 --- /dev/null +++ b/libraries/index.lib.php @@ -0,0 +1,44 @@ +' + . '
'; + $html_output .= PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']) + . sprintf( + __('Create an index on  %s columns'), + '' + ); + $html_output .= '' + . ''; + + $html_output .= '
' + . '' + . '' + . ''; + + return $html_output; +} + diff --git a/libraries/structure.lib.php b/libraries/structure.lib.php index 5c040fabe4..854afc578a 100644 --- a/libraries/structure.lib.php +++ b/libraries/structure.lib.php @@ -1585,36 +1585,6 @@ function PMA_getHtmlForAddColumn($columns_list) return $html_output; } -/** - * Get HTML for display indexes - * - * @return string $html_output - */ -function PMA_getHtmlForDisplayIndexes() -{ - $html_output = PMA_Util::getDivForSliderEffect( - 'indexes', __('Indexes') - ); - $html_output .= PMA_Index::getView($GLOBALS['table'], $GLOBALS['db']); - $html_output .= '
' - . '
'; - $html_output .= PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']) - . sprintf( - __('Create an index on  %s columns'), - '' - ); - $html_output .= '' - . ''; - - $html_output .= '
' - . '
' - . '' - . ''; - - return $html_output; -} - /** * Get HTML snippet for table rows in the Information ->Space usage table * diff --git a/tbl_structure.php b/tbl_structure.php index ffaa9dbe05..1d5067b0e0 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -17,6 +17,7 @@ require_once 'libraries/mysql_charsets.lib.php'; * Function implementations for this script */ require_once 'libraries/structure.lib.php'; +require_once 'libraries/index.lib.php'; $response = PMA_Response::getInstance(); $header = $response->getHeader();