log queries is QUERY_LOG is defined
This commit is contained in:
parent
1b87341afa
commit
65713fdf4c
|
@ -52,9 +52,11 @@ function db_escape_string($s, $strip_tags = true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function db_query($link, $query, $die_on_error = true) {
|
function db_query($link, $query, $die_on_error = true) {
|
||||||
//if ($_REQUEST["qlog"])
|
if ($_REQUEST["qlog"] || defined('QUERY_LOG')) {
|
||||||
// error_log($_SESSION["uid"] . ":" . $_REQUEST["op"] . "/" . $_REQUEST["method"] .
|
$query = trim($query);
|
||||||
// " $query\n", 3, "/tmp/ttrss-query.log");
|
error_log($_SESSION["uid"] . ":" . $_REQUEST["op"] . "/" . $_REQUEST["method"] .
|
||||||
|
" $query\n", 3, "/tmp/ttrss-query.log");
|
||||||
|
}
|
||||||
|
|
||||||
if (DB_TYPE == "pgsql") {
|
if (DB_TYPE == "pgsql") {
|
||||||
$result = pg_query($link, $query);
|
$result = pg_query($link, $query);
|
||||||
|
|
Loading…
Reference in New Issue