1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 16:44:17 +02:00

fix logger for SQL commands

This commit is contained in:
Mathieu Rochette
2015-03-11 17:52:11 +01:00
committed by Jakub Vrana
parent b8bea7fc56
commit 4cfe6263d9
4 changed files with 23 additions and 1 deletions

View File

@@ -18,6 +18,14 @@ class AdminerSqlLog {
}
function messageQuery($query, $time) {
$this->_log($query);
}
function sqlCommandQuery($query) {
$this->_log($query);
}
function _log($query) {
if ($this->filename == "") {
$adminer = adminer();
$this->filename = $adminer->database() . ".sql"; // no database goes to ".sql" to avoid collisions