aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/database_update.php46
-rw-r--r--phpBB/install/schemas/firebird_schema.sql4
-rw-r--r--phpBB/install/schemas/mssql_schema.sql6
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql4
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql4
-rw-r--r--phpBB/install/schemas/oracle_schema.sql3
-rw-r--r--phpBB/install/schemas/postgres_schema.sql2
-rw-r--r--phpBB/install/schemas/schema_data.sql5
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql2
9 files changed, 24 insertions, 52 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 3e4edc0b8f..94a4749313 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -1154,6 +1154,7 @@ function database_update_info()
'item_id' => array('UINT', 0),
'user_id' => array('UINT', 0),
'method' => array('VCHAR:255', ''),
+ 'notify' => array('BOOL', 1),
),
'PRIMARY_KEY' => array(
'item_type',
@@ -1164,6 +1165,7 @@ function database_update_info()
'KEYS' => array(
'it' => array('INDEX', 'item_type'),
'uid' => array('INDEX', 'user_id'),
+ 'no' => array('INDEX', 'notify'),
),
),
),
@@ -2755,7 +2757,7 @@ function change_database_data(&$no_updates, $version)
$config->set('site_home_text', '');
}
- if (true)//!isset($config['load_notifications']))
+ if (!isset($config['load_notifications']))
{
$config->set('load_notifications', 1);
@@ -2819,48 +2821,6 @@ function change_database_data(&$no_updates, $version)
$db->sql_freeresult($result);
}
}
-/*
- // Add default notifications
- $default_notifications = array(
- array(
- 'check' => ($config['allow_topic_notify']),
- 'item_type' => 'phpbb_notification_type_post',
- ),
- array(
- 'check' => ($config['allow_forum_notify']),
- 'item_type' => 'phpbb_notification_type_topic',
- ),
- array(
- 'check' => ($config['allow_bookmarks']),
- 'item_type' => 'phpbb_notification_type_bookmark',
- ),
- array(
- 'check' => ($config['allow_privmsg']),
- 'item_type' => 'phpbb_notification_type_pm',
- ),
- );
-
- foreach ($default_notifications as $convert_data)
- {
- if ($convert_data['check'])
- {
- $sql = 'SELECT user_id
- FROM ' . USERS_TABLE . '
- WHERE user_id <> ' . ANONYMOUS . '
- AND user_type <> ' . USER_IGNORE;
- $result = $db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
- {
- _sql('INSERT INTO ' . USER_NOTIFICATIONS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'item_type' => $convert_data['item_type'],
- 'item_id' => 0,
- 'user_id' => $row['user_id'],
- 'method' => '',
- )), $errored, $error_ary);
- }
- $db->sql_freeresult($result);
- }
- }*/
}
break;
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 5e13f98f25..4364641fe4 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -1240,13 +1240,15 @@ CREATE TABLE phpbb_user_notifications (
item_type VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
item_id INTEGER DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
- method VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
+ method VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ notify INTEGER DEFAULT 1 NOT NULL
);;
ALTER TABLE phpbb_user_notifications ADD PRIMARY KEY (item_type, item_id, user_id, method);;
CREATE INDEX phpbb_user_notifications_it ON phpbb_user_notifications(item_type);;
CREATE INDEX phpbb_user_notifications_uid ON phpbb_user_notifications(user_id);;
+CREATE INDEX phpbb_user_notifications_no ON phpbb_user_notifications(notify);;
# Table: 'phpbb_user_group'
CREATE TABLE phpbb_user_group (
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index d463afb17c..17786e27e2 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -1526,7 +1526,8 @@ CREATE TABLE [phpbb_user_notifications] (
[item_type] [varchar] (255) DEFAULT ('') NOT NULL ,
[item_id] [int] DEFAULT (0) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
- [method] [varchar] (255) DEFAULT ('') NOT NULL
+ [method] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [notify] [int] DEFAULT (1) NOT NULL
) ON [PRIMARY]
GO
@@ -1546,6 +1547,9 @@ GO
CREATE INDEX [uid] ON [phpbb_user_notifications]([user_id]) ON [PRIMARY]
GO
+CREATE INDEX [no] ON [phpbb_user_notifications]([notify]) ON [PRIMARY]
+GO
+
/*
Table: 'phpbb_user_group'
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index 9272e18735..fb91d55e5f 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -877,9 +877,11 @@ CREATE TABLE phpbb_user_notifications (
item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
method varbinary(255) DEFAULT '' NOT NULL,
+ notify tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (item_type, item_id, user_id, method),
KEY it (item_type),
- KEY uid (user_id)
+ KEY uid (user_id),
+ KEY no (notify)
);
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index a73fda41f5..3601f2a43c 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -877,9 +877,11 @@ CREATE TABLE phpbb_user_notifications (
item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
method varchar(255) DEFAULT '' NOT NULL,
+ notify tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (item_type, item_id, user_id, method),
KEY it (item_type),
- KEY uid (user_id)
+ KEY uid (user_id),
+ KEY no (notify)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 02be9566dc..15c3012e28 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -1645,6 +1645,7 @@ CREATE TABLE phpbb_user_notifications (
item_id number(8) DEFAULT '0' NOT NULL,
user_id number(8) DEFAULT '0' NOT NULL,
method varchar2(255) DEFAULT '' ,
+ notify number(1) DEFAULT '1' NOT NULL,
CONSTRAINT pk_phpbb_user_notifications PRIMARY KEY (item_type, item_id, user_id, method)
)
/
@@ -1653,6 +1654,8 @@ CREATE INDEX phpbb_user_notifications_it ON phpbb_user_notifications (item_type)
/
CREATE INDEX phpbb_user_notifications_uid ON phpbb_user_notifications (user_id)
/
+CREATE INDEX phpbb_user_notifications_no ON phpbb_user_notifications (notify)
+/
/*
Table: 'phpbb_user_group'
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 784e3c8c68..263a9884b7 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -1127,11 +1127,13 @@ CREATE TABLE phpbb_user_notifications (
item_id INT4 DEFAULT '0' NOT NULL CHECK (item_id >= 0),
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
method varchar(255) DEFAULT '' NOT NULL,
+ notify INT2 DEFAULT '1' NOT NULL CHECK (notify >= 0),
PRIMARY KEY (item_type, item_id, user_id, method)
);
CREATE INDEX phpbb_user_notifications_it ON phpbb_user_notifications (item_type);
CREATE INDEX phpbb_user_notifications_uid ON phpbb_user_notifications (user_id);
+CREATE INDEX phpbb_user_notifications_no ON phpbb_user_notifications (notify);
/*
Table: 'phpbb_user_group'
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 28f8b1c3b6..e100a1dc14 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -771,13 +771,8 @@ INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg');
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm');
# User Notification Options (for first user)
-INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('report', 0, 2, '');
-INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('needs_approval', 0, 2, '');
-INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('phpbb_notification_type_bookmark', 0, 2, '');
-INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('phpbb_notification_type_pm', 0, 2, '');
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('phpbb_notification_type_post', 0, 2, '');
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('phpbb_notification_type_post', 0, 2, 'phpbb_notification_method_email');
-INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('phpbb_notification_type_quote', 0, 2, '');
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('phpbb_notification_type_topic', 0, 2, '');
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('phpbb_notification_type_topic', 0, 2, 'phpbb_notification_method_email');
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 2fdac43947..1ca904e3bd 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -850,11 +850,13 @@ CREATE TABLE phpbb_user_notifications (
item_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
method varchar(255) NOT NULL DEFAULT '',
+ notify INTEGER UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (item_type, item_id, user_id, method)
);
CREATE INDEX phpbb_user_notifications_it ON phpbb_user_notifications (item_type);
CREATE INDEX phpbb_user_notifications_uid ON phpbb_user_notifications (user_id);
+CREATE INDEX phpbb_user_notifications_no ON phpbb_user_notifications (notify);
# Table: 'phpbb_user_group'
CREATE TABLE phpbb_user_group (