require_once './libraries/StorageEngine.class.php'; /** * Class for partition management */ require_once './libraries/Partition.class.php'; require_once './libraries/tbl_columns_definition_form.lib.php'; /** @var PMA_String $pmaString */ $pmaString = $GLOBALS['PMA_String']; $length_values_input_size = 8; $_form_params = PMA_getFormsParameters($server, $db, $table, $action, isset($num_fields) ? $num_fields : null, isset($selected) ? $selected : null); $is_backup = $action != 'tbl_create.php' && $action != 'tbl_addfield.php'; require_once './libraries/transformations.lib.php'; $cfgRelation = PMA_getRelationsParam(); $comments_map = PMA_getComments($db, $table); if (isset($fields_meta)) { $move_columns = PMA_getMoveColumns($db, $table); } if ($cfgRelation['mimework'] && $GLOBALS['cfg']['BrowseMIME']) { $mime_map = PMA_getMIME($db, $table); $available_mime = PMA_getAvailableMIMEtypes(); } $header_cells = PMA_getHeaderCells($is_backup, isset($fields_meta) ? $fields_meta : null, $cfgRelation['mimework'], $db, $table); // workaround for field_fulltext, because its submitted indices contain // the index as a value, not a key. Inserted here for easier maintenance // and less code to change in existing files. if (isset($field_fulltext) && is_array($field_fulltext)) { foreach ($field_fulltext as $fulltext_nr => $fulltext_indexkey) { $submit_fulltext[$fulltext_indexkey] = $fulltext_indexkey; } } if (isset($_REQUEST['submit_num_fields'])) {
/** * Test for PMA_getMoveColumns * * @return void */ public function testGetMoveColumns() { $dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock(); $dbi->expects($this->once())->method('tryQuery')->with("SELECT * FROM `db`.`table` LIMIT 1")->will($this->returnValue('v1')); $dbi->expects($this->once())->method('getFieldsMeta')->with("v1")->will($this->returnValue('movecols')); $GLOBALS['dbi'] = $dbi; $this->assertEquals(PMA_getMoveColumns('db', 'table'), 'movecols'); }