summaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-01-27 19:41:01 +0000
committerDries Buytaert <dries@buytaert.net>2005-01-27 19:41:01 +0000
commit1f91662123e49e2f3155bbc4333d5963fe6864e9 (patch)
tree5a0bef587faf81bc5c0ca65d214878197ebf0272 /database
parentb5a72f6216a1b0ba29e82cebd859ab5a8f2ec8c4 (diff)
downloadbrdo-1f91662123e49e2f3155bbc4333d5963fe6864e9.tar.gz
brdo-1f91662123e49e2f3155bbc4333d5963fe6864e9.tar.bz2
- Patch #16074 by Andre Molnar: add configuration option to show blocks only on pages of certain node type.
Diffstat (limited to 'database')
-rw-r--r--database/database.mysql3
-rw-r--r--database/database.pgsql4
-rw-r--r--database/updates.inc11
3 files changed, 15 insertions, 3 deletions
diff --git a/database/database.mysql b/database/database.mysql
index 3a02be088..2b7bdc131 100644
--- a/database/database.mysql
+++ b/database/database.mysql
@@ -126,7 +126,8 @@ CREATE TABLE blocks (
custom tinyint(2) DEFAULT '0' NOT NULL,
throttle tinyint(1) DEFAULT '0' NOT NULL,
visibility tinyint(1) DEFAULT '0' NOT NULL,
- pages text NOT NULL
+ pages text NOT NULL,
+ types text NOT NULL
) TYPE=MyISAM;
--
diff --git a/database/database.pgsql b/database/database.pgsql
index d2d807f24..de167cd41 100644
--- a/database/database.pgsql
+++ b/database/database.pgsql
@@ -55,7 +55,9 @@ CREATE TABLE blocks (
region smallint NOT NULL default '0',
path varchar(255) NOT NULL default '',
custom smallint NOT NULL default '0',
- throttle smallint NOT NULL default '0'
+ throttle smallint NOT NULL default '0',
+ pages text default '',
+ types text default ''
);
--
diff --git a/database/updates.inc b/database/updates.inc
index 34272a0a9..fdcde4c61 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -97,7 +97,8 @@ $sql_updates = array(
"2005-01-19" => "update_118",
"2005-01-20" => "update_119",
"2005-01-25" => "update_120",
- "2005-01-26" => "update_121"
+ "2005-01-26" => "update_121",
+ "2005-01-27" => "update_122"
);
function update_32() {
@@ -2169,6 +2170,14 @@ function update_121() {
return $ret;
}
+function update_122() {
+
+ $ret = array();
+ $ret[] = update_sql("ALTER TABLE {blocks} ADD type text");
+ return $ret;
+
+}
+
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);