fix DocBlock
[phpmyadmin.git] / tbl_indexes.php
blobe095ded8338648c258172f7308c6055e559f0d81
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Displays index edit/creation form and handles it
6 * @package PhpMyAdmin
7 */
9 /**
10 * Gets some core libraries
12 require_once 'libraries/common.inc.php';
13 require_once 'libraries/Index.class.php';
14 require_once 'libraries/tbl_common.inc.php';
15 require_once 'libraries/tbl_indexes.lib.php';
18 $index = PMA_prepareFormValues($db, $table);
19 /**
20 * Process the data from the edit/create index form,
21 * run the query to build the new index
22 * and moves back to "tbl_sql.php"
24 if (isset($_REQUEST['do_save_data'])) {
25 PMA_handleCreateOrEditIndex($db, $table, $index);
26 } // end builds the new index
29 /**
30 * Display the form to edit/create an index
32 require_once 'libraries/tbl_info.inc.php';
34 $add_fields = PMA_getNumberOfFieldsForForm($index);
36 $form_params = PMA_getFormParameters($db, $table);
38 // Get fields and stores their name/type
39 $fields = PMA_getNameAndTypeOfTheColumns($db, $table);
41 $html = PMA_getHtmlForIndexForm($fields, $index, $form_params, $add_fields);
43 $response = PMA_Response::getInstance();
44 $response->addHTML($html);
45 $header = $response->getHeader();
46 $scripts = $header->getScripts();
47 $scripts->addFile('indexes.js');