summaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-01-09 09:22:40 +0000
committerDries Buytaert <dries@buytaert.net>2005-01-09 09:22:40 +0000
commit64b100d19ace2c9b82ced4438036a64a69eda3c3 (patch)
tree36a433e7cd27810edb315c2fc79e764742019b54 /database
parent0830efe9a6c056d20a286880733fedcbd28b62fa (diff)
downloadbrdo-64b100d19ace2c9b82ced4438036a64a69eda3c3.tar.gz
brdo-64b100d19ace2c9b82ced4438036a64a69eda3c3.tar.bz2
- Patch #13260 by UnConeD: watchdog module improvements.
We added a 'severity' column to watchdog(): watchdog($type, $message, $link) --> watchdog($type, $message, $severity, $link); * Specify a severity in case you are reporting a warning or error. * The $link-parameter is now the fourth parameter instead of the third. TODO: document this in the upgrade guide.
Diffstat (limited to 'database')
-rw-r--r--database/database.pgsql1
-rw-r--r--database/updates.inc14
2 files changed, 14 insertions, 1 deletions
diff --git a/database/database.pgsql b/database/database.pgsql
index ec038e2c1..5c2f9265c 100644
--- a/database/database.pgsql
+++ b/database/database.pgsql
@@ -750,6 +750,7 @@ CREATE TABLE watchdog (
uid integer NOT NULL default '0',
type varchar(16) NOT NULL default '',
message text NOT NULL default '',
+ severity smallint NOT NULL default '0',
link varchar(255) NOT NULL default '',
location varchar(128) NOT NULL default '',
hostname varchar(128) NOT NULL default '',
diff --git a/database/updates.inc b/database/updates.inc
index 1d0de1eeb..1a340188a 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -90,7 +90,8 @@ $sql_updates = array(
"2004-11-07" => "update_111",
"2004-11-15" => "update_112",
"2004-11-28" => "update_113",
- "2004-12-05" => "update_114"
+ "2004-12-05" => "update_114",
+ "2005-01-07" => "update_115"
);
function update_32() {
@@ -2066,6 +2067,17 @@ function update_114() {
return $ret;
}
+function update_115() {
+ $ret = array();
+ if ($GLOBALS['db_type'] == 'mysql') {
+ $ret[] = update_sql("ALTER TABLE {watchdog} ADD severity tinyint(3) unsigned NOT NULL default '0'");
+ }
+ else if ($GLOBALS['db_type'] == 'pgsql') {
+ $ret[] = update_sql("ALTER TABLE {watchdog} ADD severity smallint NOT NULL default '0'");
+ }
+ return $ret;
+}
+
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);