From ed3c2129cde72f5b87adbe6e51c23ecfdfe1524c Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Wed, 2 Nov 2011 13:14:22 +0100 Subject: [PATCH] Adds notify_all flag to groups. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- classes/group.php | 1 + upgrade/1.1.4/11_groups.sql | 2 ++ 2 files changed, 3 insertions(+) diff --git a/classes/group.php b/classes/group.php index d17562c..72ce770 100644 --- a/classes/group.php +++ b/classes/group.php @@ -117,6 +117,7 @@ class Group $res = XDB::query('SELECT a.*, d.nom AS domnom, FIND_IN_SET(\'wiki_desc\', a.flags) AS wiki_desc, FIND_IN_SET(\'notif_unsub\', a.flags) AS notif_unsub, + FIND_IN_SET(\'notify_all\', a.flags) AS notify_all, (nls.id IS NOT NULL) AS has_nl, ad.text AS address, p.display_tel AS phone, f.display_tel AS fax FROM groups AS a diff --git a/upgrade/1.1.4/11_groups.sql b/upgrade/1.1.4/11_groups.sql index 6910c8e..0b8f906 100644 --- a/upgrade/1.1.4/11_groups.sql +++ b/upgrade/1.1.4/11_groups.sql @@ -1,3 +1,5 @@ ALTER TABLE group_members ADD COLUMN flags SET('notify') NOT NULL DEFAULT ''; +ALTER TABLE groups MODIFY COLUMN flags SET('wiki_desc','notif_unsub','has_ml', 'notify_all') NOT NULL DEFAULT 'notify_all'; +UPDATE groups SET flags = CONCAT(flags, ',', 'notify_all') WHERE NOT FIND_IN_SET('notify_all', flags); -- vim:set syntax=mysql: -- 2.1.4