From 569aed795cbd9349afc0e2626d306f5ffb950cf4 Mon Sep 17 00:00:00 2001 From: Jo Michael Date: Sun, 15 Apr 2012 06:11:11 +0200 Subject: [PATCH] Drop view confirm properly, don't show truncate action for views --- db_structure.php | 8 +++++++- js/db_structure.js | 14 +++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/db_structure.php b/db_structure.php index a80283094e..e190025f7a 100644 --- a/db_structure.php +++ b/db_structure.php @@ -372,6 +372,10 @@ foreach ($tables as $keyname => $each_table) { $empty_table .= $titles['NoEmpty']; } $empty_table .= ''; + // truncating views doesn't work + if ($table_is_view) { + $empty_table = ' '; + } $drop_query = 'DROP ' . ($table_is_view ? 'VIEW' : 'TABLE') @@ -446,7 +450,9 @@ foreach ($tables as $keyname => $each_table) { unset($table_part); } ?> -