From 38cf6ca403b485644405b8ec39af334a877e58b2 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 30 Jan 2009 20:52:25 +0000 Subject: The start of the notification module. At this point, the icon has been added to the item menu in the sidebar (both photo and album). There is a corresponding icon in themes/default/images that needs to be spruced up. You can add and remove notifications to albums and photos, but nothing happens under the covers for event handling. --- .../helpers/notification_installer.php | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 modules/notification/helpers/notification_installer.php (limited to 'modules/notification/helpers/notification_installer.php') diff --git a/modules/notification/helpers/notification_installer.php b/modules/notification/helpers/notification_installer.php new file mode 100644 index 00000000..c2a9828f --- /dev/null +++ b/modules/notification/helpers/notification_installer.php @@ -0,0 +1,46 @@ +query("CREATE TABLE IF NOT EXISTS `subscriptions` ( + `id` int(9) NOT NULL auto_increment, + `item_id` int(9) NOT NULL, + `apply_to_children` tinyint(1) NOT NULL, + `user_id` int(9) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY (`item_id`, `user_id`), + UNIQUE KEY (`user_id`, `item_id`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + + module::set_version("notification", 1); + } + } + + static function uninstall() { + $db = Database::instance(); + $db->query("DROP TABLE IF EXISTS `subscriptions`;"); + + module::delete("notification"); + } +} -- cgit v1.2.3