summaryrefslogtreecommitdiff
path: root/includes/bootstrap.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-12-10 23:09:31 +0000
committerDries Buytaert <dries@buytaert.net>2003-12-10 23:09:31 +0000
commitb1ef96931af52cd6234162f4d2dc6e2736c00d8e (patch)
tree310958ea3ce4109adbb7274e04be385c1e4c9b2b /includes/bootstrap.inc
parent35fb88977672a3b081a3a9b07471f802cc264d9d (diff)
downloadbrdo-b1ef96931af52cd6234162f4d2dc6e2736c00d8e.tar.gz
brdo-b1ef96931af52cd6234162f4d2dc6e2736c00d8e.tar.bz2
- Moved the watchdog() function to the bootsrap file. Patch by Moshe.
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r--includes/bootstrap.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index c13f1b8b7..eb15f13d8 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -213,6 +213,11 @@ function timer_start() {
$timer = (float)$usec + (float)$sec;
}
+function watchdog($type, $message, $link = NULL) {
+ global $user;
+ db_query("INSERT INTO {watchdog} (uid, type, message, link, location, hostname, timestamp) VALUES (%d, '%s', '%s', '%s', '%s', '%s', %d)", $user->uid, $type, $message, $link, request_uri(), getenv("REMOTE_ADDR"), time());
+}
+
unset($conf);
$config = conf_init();