mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Table names always need quoting https://github.com/virtualmin/virtualmin-gpl/issues/258
This commit is contained in:
@@ -8,7 +8,8 @@ require './postgresql-lib.pl';
|
||||
&can_edit_db($in{'db'}) || &error($text{'dbase_ecannot'});
|
||||
if ($in{'confirm'}) {
|
||||
# Drop the database
|
||||
&execute_sql_logged($config{'basedb'}, "drop database \"$in{'db'}\"");
|
||||
&execute_sql_logged($config{'basedb'},
|
||||
"drop database "."e_table($in{'db'}));
|
||||
&delete_database_backup_job($in{'db'});
|
||||
&webmin_log("delete", "db", $in{'db'});
|
||||
&redirect("");
|
||||
@@ -19,7 +20,8 @@ else {
|
||||
@tables = &list_tables($in{'db'});
|
||||
$rows = 0;
|
||||
foreach $t (@tables) {
|
||||
$d = &execute_sql($in{'db'}, "select count(*) from $t");
|
||||
$d = &execute_sql($in{'db'},
|
||||
"select count(*) from "."e_table($t));
|
||||
$rows += $d->{'data'}->[0]->[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user