diff --git a/ChangeLog b/ChangeLog index 07873bb3cb..2af6e5f039 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,7 @@ phpMyAdmin - ChangeLog - issue #11412 Remove PmaAbsoluteUri configuration directive - issue #11914 Fix autoloading of phpseclib - issue #11880 Fixed rendering of missing extension error +- issue #11923 Errors on Structure tab when user only has select access on certain columns 4.5.5.0 (not yet released) - issue Undefined index: is_ajax_request diff --git a/libraries/controllers/table/TableStructureController.php b/libraries/controllers/table/TableStructureController.php index e94d045b97..1510f7decb 100644 --- a/libraries/controllers/table/TableStructureController.php +++ b/libraries/controllers/table/TableStructureController.php @@ -349,32 +349,11 @@ class TableStructureController extends TableController $this->db, $this->table, null, true ); - // Get more complete field information - // For now, this is done just for MySQL 4.1.2+ new TIMESTAMP options - // but later, if the analyser returns more information, it - // could be executed for any MySQL version and replace - // the info given by SHOW FULL COLUMNS FROM. - // - // We also need this to correctly learn if a TIMESTAMP is NOT NULL, since - // SHOW FULL COLUMNS or INFORMATION_SCHEMA incorrectly says NULL - // and SHOW CREATE TABLE says NOT NULL (tested - // in MySQL 4.0.25 and 5.0.21, http://bugs.mysql.com/20910). - - $show_create_table = $this->table_obj->showCreate(); - $parser = new SqlParser\Parser($show_create_table); - - /** - * @var CreateStatement $stmt - */ - $stmt = $parser->statements[0]; - - $create_table_fields = SqlTable::getFields($stmt); - //display table structure $this->response->addHTML( $this->displayStructure( - $cfgRelation, $columns_with_unique_index, $url_params, $primary, - $fields, $columns_with_index, $create_table_fields + $cfgRelation, $columns_with_unique_index, $url_params, + $primary, $fields, $columns_with_index ) ); @@ -1167,13 +1146,12 @@ class TableStructureController extends TableController * no one exists * @param array $fields Fields * @param array $columns_with_index Columns with index - * @param array $create_table_fields Fields of the table. * * @return string */ protected function displayStructure( - $cfgRelation, $columns_with_unique_index, $url_params, $primary_index, - $fields, $columns_with_index, $create_table_fields + $cfgRelation, $columns_with_unique_index, $url_params, + $primary_index, $fields, $columns_with_index ) { /* TABLE INFORMATION */ $HideStructureActions = ''; @@ -1296,7 +1274,6 @@ class TableStructureController extends TableController 'fields' => $fields, 'columns_with_index' => $columns_with_index, 'central_list' => $central_list, - 'create_table_fields' => $create_table_fields, 'comments_map' => $comments_map ) ); diff --git a/templates/table/structure/display_structure.phtml b/templates/table/structure/display_structure.phtml index e97b3edd4a..ceece39f02 100644 --- a/templates/table/structure/display_structure.phtml +++ b/templates/table/structure/display_structure.phtml @@ -28,34 +28,14 @@ $rownum = 0; $odd_row = true; ?> NULL';