diff --git a/libraries/Menu.php b/libraries/Menu.php index 1374c6a6e6e..c9a02fe0baa 100644 --- a/libraries/Menu.php +++ b/libraries/Menu.php @@ -240,7 +240,7 @@ private function _getBreadcrumbs() $show_comment = null; } else { $tbl_is_view = false; - $show_comment = $table_class_object->getShowComment(); + $show_comment = $table_class_object->getComment(); } $retval .= $separator; if (Util::showIcons('TabsMode')) { diff --git a/libraries/Table.php b/libraries/Table.php index 52c0fb7ecea..8521943b181 100644 --- a/libraries/Table.php +++ b/libraries/Table.php @@ -339,11 +339,12 @@ public function getStorageEngine() { * * @return string Return comment info if it is set for the selected table or return blank. */ - public function getShowComment() { + public function getComment() { $table_comment = $this->getStatusInfo('COMMENT', false, true); if ($table_comment === false) { - return isset($table_comment) ? $table_comment : ''; + return ''; } + return $table_comment; } /** diff --git a/libraries/controllers/table/TableChartController.php b/libraries/controllers/table/TableChartController.php index 8ea597f61b3..7fbc0c95d7b 100644 --- a/libraries/controllers/table/TableChartController.php +++ b/libraries/controllers/table/TableChartController.php @@ -128,7 +128,7 @@ public function indexAction() } else { $tbl_is_view = false; $tbl_storage_engine = $table_class_object->getStorageEngine(); - $show_comment = $table_class_object->getShowComment(); + $show_comment = $table_class_object->getComment(); } $tbl_collation = $table_class_object->getTableCollation(); $table_info_num_rows = $table_class_object->getTableNumRowInfo(); diff --git a/libraries/controllers/table/TableIndexesController.php b/libraries/controllers/table/TableIndexesController.php index 0b2b869e25d..8b05399da2a 100644 --- a/libraries/controllers/table/TableIndexesController.php +++ b/libraries/controllers/table/TableIndexesController.php @@ -76,7 +76,7 @@ public function displayFormAction() } else { $tbl_is_view = false; $tbl_storage_engine = $table_class_object->getStorageEngine(); - $show_comment = $table_class_object->getShowComment(); + $show_comment = $table_class_object->getComment(); } $tbl_collation = $table_class_object->getTableCollation(); $table_info_num_rows = $table_class_object->getTableNumRowInfo(); diff --git a/tbl_operations.php b/tbl_operations.php index 0db89ffe8ea..03a58a42087 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -222,7 +222,7 @@ } else { $tbl_is_view = false; $tbl_storage_engine = $pma_table->getStorageEngine(); - $show_comment = $pma_table->getShowComment(); + $show_comment = $pma_table->getComment(); } $tbl_collation = $pma_table->getTableCollation(); $table_info_num_rows = $pma_table->getTableNumRowInfo(); diff --git a/test/classes/TableTest.php b/test/classes/TableTest.php index f2b98beebee..32ebf2d4d1c 100644 --- a/test/classes/TableTest.php +++ b/test/classes/TableTest.php @@ -1226,11 +1226,11 @@ public function testGetStorageEngine(){ } /** - * Test for getShowComment + * Test for getComment * * @return void */ - public function testGetShowComment(){ + public function testGetComment(){ $target_table = 'table1'; $target_db = 'pma_test'; $tbl_object = new Table($target_db, $target_table); @@ -1241,7 +1241,7 @@ public function testGetShowComment(){ $show_comment = $dbi->getTable( $target_db, $target_table - )->getShowComment(); + )->getComment(); $this->assertEquals( $expect, $show_comment