mirror of
https://github.com/vrana/adminer.git
synced 2025-08-29 01:00:07 +02:00
Introduce apply_queries function
This commit is contained in:
@@ -526,12 +526,7 @@ if (!defined("DRIVER")) {
|
||||
*/
|
||||
function drop_databases($databases) {
|
||||
set_session("databases", null);
|
||||
foreach ($databases as $db) {
|
||||
if (!queries("DROP DATABASE " . idf_escape($db))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return apply_queries("DROP DATABASE", $db, 'idf_escape');
|
||||
}
|
||||
|
||||
/** Rename database from DB
|
||||
@@ -634,12 +629,7 @@ if (!defined("DRIVER")) {
|
||||
* @return bool
|
||||
*/
|
||||
function truncate_tables($tables) {
|
||||
foreach ($tables as $table) {
|
||||
if (!queries("TRUNCATE TABLE " . table($table))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return apply_queries("TRUNCATE TABLE", $tables);
|
||||
}
|
||||
|
||||
/** Drop views
|
||||
|
Reference in New Issue
Block a user