diff --git a/plugins/disable-tables.php b/plugins/disable-tables.php new file mode 100644 index 00000000..fa3691e1 --- /dev/null +++ b/plugins/disable-tables.php @@ -0,0 +1,32 @@ + true, + 'tableName2' => true, + 'tableName3' => true, + //... + ]; + + $select = filter_input(INPUT_GET, 'table', FILTER_SANITIZE_STRING); + if(isset($select) && $disabledTables[$select]) die('Access Denied.'); + + if($disabledTables[$tableStatus['Name']]){ + return false; + } + + return h($tableStatus['Name']); + // tables without comments would return empty string and will be ignored by Adminer + //return h($tableStatus['Comment']); + } + +}