filename = $filename; } function messageQuery($query, $time, $failed = false) { $this->log($query); } function sqlCommandQuery($query) { $this->log($query); } private function log($query) { if ($this->filename == "") { // the directory of the script should not be writable by the web server at all and a relative name would create the log there, where anyone could download it // no database goes to "adminer-.sql" to avoid collisions $this->filename = Adminer\get_temp_dir() . "/adminer-" . urlencode(Adminer\adminer()->database() . ($_GET["ns"] != "" ? ".$_GET[ns]" : "")) . ".sql"; } $fp = Adminer\file_open_lock($this->filename); // it also refuses a symlink and doesn't make the file readable by everyone if ($fp) { fseek($fp, 0, SEEK_END); fwrite($fp, "$query\n\n"); Adminer\file_unlock($fp); } } protected $translations = array( 'cs' => array('' => 'Zaznamenává všechny příkazy do souboru SQL'), 'de' => array('' => 'Protokollieren Sie alle Abfragen in einer SQL-Datei'), 'pl' => array('' => 'Rejestruj wszystkie zapytania do pliku SQL'), 'ro' => array('' => 'Logați toate interogările în fișierul SQL'), 'ja' => array('' => '全クエリを SQL ファイルに記録'), 'hr' => array('' => 'Bilježi sve upite u SQL datoteku'), ); }