Revision: 1662
http://mrbs.svn.sourceforge.net/mrbs/?rev=1662&view=rev
Author: cimorrison
Date: 2010-12-02 12:24:14 +0000 (Thu, 02 Dec 2010)
Log Message:
-----------
Editing and deleting individual members of a series now supported
Modified Paths:
--------------
mrbs/branches/ics_attachments/tables.my.sql
mrbs/branches/ics_attachments/tables.pg.pre73.sql
mrbs/branches/ics_attachments/tables.pg.sql
mrbs/branches/ics_attachments/web/del_entry.php
mrbs/branches/ics_attachments/web/functions_mail.inc
Modified: mrbs/branches/ics_attachments/tables.my.sql
===================================================================
--- mrbs/branches/ics_attachments/tables.my.sql 2010-12-02 11:49:07 UTC (rev
1661)
+++ mrbs/branches/ics_attachments/tables.my.sql 2010-12-02 12:24:14 UTC (rev
1662)
@@ -65,22 +65,24 @@
CREATE TABLE mrbs_entry
(
- id int NOT NULL auto_increment,
- start_time int DEFAULT '0' NOT NULL,
- end_time int DEFAULT '0' NOT NULL,
- entry_type int DEFAULT '0' NOT NULL,
- repeat_id int DEFAULT '0' NOT NULL,
- room_id int DEFAULT '1' NOT NULL,
- timestamp timestamp,
- create_by varchar(80) DEFAULT '' NOT NULL,
- name varchar(80) DEFAULT '' NOT NULL,
- type char DEFAULT 'E' NOT NULL,
- description text,
- status tinyint unsigned NOT NULL DEFAULT 0,
- reminded int,
- info_time int,
- info_user varchar(80),
- info_text text,
+ id int NOT NULL auto_increment,
+ start_time int DEFAULT '0' NOT NULL,
+ end_time int DEFAULT '0' NOT NULL,
+ entry_type int DEFAULT '0' NOT NULL,
+ repeat_id int DEFAULT '0' NOT NULL,
+ room_id int DEFAULT '1' NOT NULL,
+ timestamp timestamp,
+ create_by varchar(80) DEFAULT '' NOT NULL,
+ name varchar(80) DEFAULT '' NOT NULL,
+ type char DEFAULT 'E' NOT NULL,
+ description text,
+ status tinyint unsigned NOT NULL DEFAULT 0,
+ reminded int,
+ info_time int,
+ info_user varchar(80),
+ info_text text,
+ ical_uid varchar(255) DEFAULT '' NOT NULL,
+ ical_sequence smallint DEFAULT 0 NOT NULL,
PRIMARY KEY (id),
KEY idxStartTime (start_time),
@@ -89,24 +91,26 @@
CREATE TABLE mrbs_repeat
(
- id int NOT NULL auto_increment,
- start_time int DEFAULT '0' NOT NULL,
- end_time int DEFAULT '0' NOT NULL,
- rep_type int DEFAULT '0' NOT NULL,
- end_date int DEFAULT '0' NOT NULL,
- rep_opt varchar(32) DEFAULT '' NOT NULL,
- room_id int DEFAULT '1' NOT NULL,
- timestamp timestamp,
- create_by varchar(80) DEFAULT '' NOT NULL,
- name varchar(80) DEFAULT '' NOT NULL,
- type char DEFAULT 'E' NOT NULL,
- description text,
- rep_num_weeks smallint NULL,
- status tinyint unsigned NOT NULL DEFAULT 0,
- reminded int,
- info_time int,
- info_user varchar(80),
- info_text text,
+ id int NOT NULL auto_increment,
+ start_time int DEFAULT '0' NOT NULL,
+ end_time int DEFAULT '0' NOT NULL,
+ rep_type int DEFAULT '0' NOT NULL,
+ end_date int DEFAULT '0' NOT NULL,
+ rep_opt varchar(32) DEFAULT '' NOT NULL,
+ room_id int DEFAULT '1' NOT NULL,
+ timestamp timestamp,
+ create_by varchar(80) DEFAULT '' NOT NULL,
+ name varchar(80) DEFAULT '' NOT NULL,
+ type char DEFAULT 'E' NOT NULL,
+ description text,
+ rep_num_weeks smallint NULL,
+ status tinyint unsigned NOT NULL DEFAULT 0,
+ reminded int,
+ info_time int,
+ info_user varchar(80),
+ info_text text,
+ ical_uid varchar(255) DEFAULT '' NOT NULL,
+ ical_sequence smallint DEFAULT 0 NOT NULL,
PRIMARY KEY (id)
);
@@ -133,6 +137,6 @@
);
INSERT INTO mrbs_variables (variable_name, variable_content)
- VALUES ( 'db_version', '22');
+ VALUES ( 'db_version', '23');
INSERT INTO mrbs_variables (variable_name, variable_content)
VALUES ( 'local_db_version', '1');
Modified: mrbs/branches/ics_attachments/tables.pg.pre73.sql
===================================================================
--- mrbs/branches/ics_attachments/tables.pg.pre73.sql 2010-12-02 11:49:07 UTC
(rev 1661)
+++ mrbs/branches/ics_attachments/tables.pg.pre73.sql 2010-12-02 12:24:14 UTC
(rev 1662)
@@ -124,6 +124,6 @@
);
INSERT INTO mrbs_variables (variable_name, variable_content)
- VALUES ('db_version', '22');
+ VALUES ('db_version', '23');
INSERT INTO mrbs_variables (variable_name, variable_content)
VALUES ('local_db_version', '1');
Modified: mrbs/branches/ics_attachments/tables.pg.sql
===================================================================
--- mrbs/branches/ics_attachments/tables.pg.sql 2010-12-02 11:49:07 UTC (rev
1661)
+++ mrbs/branches/ics_attachments/tables.pg.sql 2010-12-02 12:24:14 UTC (rev
1662)
@@ -77,22 +77,24 @@
CREATE TABLE mrbs_entry
(
- id serial primary key,
- start_time int DEFAULT 0 NOT NULL,
- end_time int DEFAULT 0 NOT NULL,
- entry_type int DEFAULT 0 NOT NULL,
- repeat_id int DEFAULT 0 NOT NULL,
- room_id int DEFAULT 1 NOT NULL,
- timestamp timestamp DEFAULT current_timestamp,
- create_by varchar(80) NOT NULL,
- name varchar(80) NOT NULL,
- type char DEFAULT 'E' NOT NULL,
- description text,
- status smallint DEFAULT 0 NOT NULL,
- reminded int,
- info_time int,
- info_user varchar(80),
- info_text text
+ id serial primary key,
+ start_time int DEFAULT 0 NOT NULL,
+ end_time int DEFAULT 0 NOT NULL,
+ entry_type int DEFAULT 0 NOT NULL,
+ repeat_id int DEFAULT 0 NOT NULL,
+ room_id int DEFAULT 1 NOT NULL,
+ timestamp timestamp DEFAULT current_timestamp,
+ create_by varchar(80) NOT NULL,
+ name varchar(80) NOT NULL,
+ type char DEFAULT 'E' NOT NULL,
+ description text,
+ status smallint DEFAULT 0 NOT NULL,
+ reminded int,
+ info_time int,
+ info_user varchar(80),
+ info_text text,
+ ical_uid varchar(255) DEFAULT '' NOT NULL,
+ ical_sequence smallint DEFAULT 0 NOT NULL
);
create index mrbs_idxStartTime on mrbs_entry(start_time);
create index mrbs_idxEndTime on mrbs_entry(end_time);
@@ -100,23 +102,25 @@
CREATE TABLE mrbs_repeat
(
id serial primary key,
- start_time int DEFAULT 0 NOT NULL,
- end_time int DEFAULT 0 NOT NULL,
- rep_type int DEFAULT 0 NOT NULL,
- end_date int DEFAULT 0 NOT NULL,
- rep_opt varchar(32) NOT NULL,
- room_id int DEFAULT 1 NOT NULL,
- timestamp timestamp DEFAULT current_timestamp,
- create_by varchar(80) NOT NULL,
- name varchar(80) NOT NULL,
- type char DEFAULT 'E' NOT NULL,
- description text,
- rep_num_weeks smallint DEFAULT 0 NULL,
- status smallint DEFAULT 0 NOT NULL,
- reminded int,
- info_time int,
- info_user varchar(80),
- info_text text
+ start_time int DEFAULT 0 NOT NULL,
+ end_time int DEFAULT 0 NOT NULL,
+ rep_type int DEFAULT 0 NOT NULL,
+ end_date int DEFAULT 0 NOT NULL,
+ rep_opt varchar(32) NOT NULL,
+ room_id int DEFAULT 1 NOT NULL,
+ timestamp timestamp DEFAULT current_timestamp,
+ create_by varchar(80) NOT NULL,
+ name varchar(80) NOT NULL,
+ type char DEFAULT 'E' NOT NULL,
+ description text,
+ rep_num_weeks smallint DEFAULT 0 NULL,
+ status smallint DEFAULT 0 NOT NULL,
+ reminded int,
+ info_time int,
+ info_user varchar(80),
+ info_text text,
+ ical_uid varchar(255) DEFAULT '' NOT NULL,
+ ical_sequence smallint DEFAULT 0 NOT NULL
);
CREATE TABLE mrbs_variables
@@ -137,6 +141,6 @@
);
INSERT INTO mrbs_variables (variable_name, variable_content)
- VALUES ('db_version', '22');
+ VALUES ('db_version', '23');
INSERT INTO mrbs_variables (variable_name, variable_content)
VALUES ('local_db_version', '1');
Modified: mrbs/branches/ics_attachments/web/del_entry.php
===================================================================
--- mrbs/branches/ics_attachments/web/del_entry.php 2010-12-02 11:49:07 UTC
(rev 1661)
+++ mrbs/branches/ics_attachments/web/del_entry.php 2010-12-02 12:24:14 UTC
(rev 1662)
@@ -70,6 +70,13 @@
require_once "functions_mail.inc";
// Gather all fields values for use in emails.
$mail_previous = getPreviousEntryData($id, FALSE);
+ // If this is an individual entry of a series then force the entry_type
+ // to be 2, so that when we create the iCalendar object we know that
+ // we only want to delete the individual entry
+ if (!$series && ($mail_previous['rep_type'] != REP_NONE))
+ {
+ $mail_previous['entry_type'] = 2;
+ }
}
sql_begin();
$result = mrbsDelEntry(getUserName(), $id, $series, 1);
Modified: mrbs/branches/ics_attachments/web/functions_mail.inc
===================================================================
--- mrbs/branches/ics_attachments/web/functions_mail.inc 2010-12-02
11:49:07 UTC (rev 1661)
+++ mrbs/branches/ics_attachments/web/functions_mail.inc 2010-12-02
12:24:14 UTC (rev 1662)
@@ -392,6 +392,11 @@
$results[] = "DESCRIPTION:" . $data['description'];
$results[] = "LOCATION:" . $data['area_name'] . " - " . $data['room_name'];
$results[] = "SEQUENCE:" . $data['ical_sequence'];
+ // If this is an individual member of a series then set the recurrence id
+ if ($data['entry_type'] == 2)
+ {
+ $results[] = "RECURRENCE-ID:" . gmdate(RFC5545_FORMAT . '\Z',
$data['start_time']);
+ }
if ($confirmation_enabled)
{
$results[] = "STATUS:". (($data['status'] & STATUS_TENTATIVE) ?
"TENTATIVE" : "CONFIRMED");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits