From 11ee95dadc408e16e9832af9fd0b41495e78b0a6 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 19 Oct 2000 13:31:23 +0000 Subject: A big, fat commit with a shitload of internal changes. Not that much visual changes: - removed redundant files user.class.php, calendar.class.php and backend.class.php. - converted *all* mysql queries to queries supported by the database abstraction layer. - expanded the watchdog to record more information on what actually happened. - bugfix: anonymous readers where not able to view comments. - bugfix: anonymous readers could gain read-only access to the submission queue. - bugfix: invalid includes in backend.php - bugfix: invalid use of '$user->block' and last but not least: - redid 50% of the user account system --- includes/database.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'includes/database.inc') diff --git a/includes/database.inc b/includes/database.inc index 3721fbd65..843cb270a 100644 --- a/includes/database.inc +++ b/includes/database.inc @@ -26,9 +26,8 @@ function db_query($query, $debug = false) { $qid = mysql_query($query); ### debug output (if required): - if ($debug || empty($qid)) { - print "
query: ". htmlspecialchars($query) ."
error message: ". mysql_error() ."
"; - } + if ($debug || empty($qid)) print "
query: ". htmlspecialchars($query) ."
error message: ". mysql_error() ."
"; + if (empty($qid)) watchdog(3, "error: ". mysql_error() ."
query: ". htmlspecialchars($query) .""); ### return result from query: return $qid; -- cgit v1.2.3