From ff743830ff439664d0db33ea3ca0552caed7b32b Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Tue, 8 Mar 2016 16:02:05 +1100 Subject: [PATCH] Fix #12073 Hide edit and delete buttons when the results are not related to a table Signed-off-by: Madhura Jayaratne --- ChangeLog | 1 + libraries/DisplayResults.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index ffb8e0ae9b..7da42902d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -49,6 +49,7 @@ phpMyAdmin - ChangeLog - issue Fix SQL syntax highlighting in database search page - issue #12056 Fix error when we can not generate random string - issue #12055 Fixed PHP syntax error in templates +- issue #12073 Hide edit and delete buttons when the results are not related to a table 4.5.5.1 (2016-02-29) - issue #11971 CREATE UNIQUE INDEX index type is not recognized by parser. diff --git a/libraries/DisplayResults.php b/libraries/DisplayResults.php index de5b495eb3..a3d7288480 100644 --- a/libraries/DisplayResults.php +++ b/libraries/DisplayResults.php @@ -572,6 +572,13 @@ class DisplayResults $prev_table = $fields_meta[$i]->table; } } // end for + + if ($prev_table == '') { // no table for any of the columns + // don't display links + $displayParts['edit_lnk'] = self::NO_EDIT_OR_DELETE; + $displayParts['del_lnk'] = self::NO_EDIT_OR_DELETE; + } + return $displayParts; }