From: Andrew Dolgov Date: Fri, 11 Nov 2011 08:26:54 +0000 (+0400) Subject: add optional query log X-Git-Tag: 1.5.7~26 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0c543d46b34fc1542d37cd4b44b70d848eab0a27;p=tt-rss.git add optional query log --- diff --git a/db.php b/db.php index 81da431b..e886e51a 100644 --- a/db.php +++ b/db.php @@ -52,6 +52,10 @@ function db_escape_string($s, $strip_tags = true) { } function db_query($link, $query, $die_on_error = true) { + if ($_REQUEST["qlog"]) + error_log($_SESSION["uid"] . ":" . $_REQUEST["op"] . "/" . $_REQUEST["subop"] . + " $query\n", 3, "/tmp/ttrss-query.log"); + if (DB_TYPE == "pgsql") { $result = pg_query($link, $query); if (!$result) {