Bug 735619 - Event is moved from original calendar to primary Google calendar upon editing. r=philipp,a=philipp
authorMatthew Mecca <matthew.mecca@gmail.com>
Tue, 03 Apr 2012 11:30:16 +0200
changeset 10689 4ffd398b18aa857ec700a70b0689932bec2a8e74
parent 10688 fb70d355fbf48e7ea3d31aa943ce4c0bf421780b
child 10690 142616026683ff7ae8b22bec6793f9646e76825b
push idunknown
push userunknown
push dateunknown
reviewersphilipp, philipp
bugs735619
Bug 735619 - Event is moved from original calendar to primary Google calendar upon editing. r=philipp,a=philipp
calendar/base/content/dialogs/calendar-event-dialog.js
calendar/providers/gdata/components/calGoogleCalendar.js
--- a/calendar/base/content/dialogs/calendar-event-dialog.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog.js
@@ -1921,17 +1921,17 @@ function attachmentLinkClicked(event) {
  */
 function updateCalendar() {
     let item = window.calendarItem;
     let calendar = getCurrentCalendar();
 
     gIsReadOnly = calendar.readOnly;
 
     // We might have to change the organizer, let's see
-    if (window.organizer) {
+    if (window.organizer && calendar.aclEntry) {
       window.organizer.id = calendar.getProperty("organizerId");
       window.organizer.commonName = calendar.getProperty("organizerCN");
     }
 
     if (!canNotifyAttendees(calendar, item) && calendar.getProperty("imip.identity")) {
         enableElement("notify-attendees-checkbox");
     } else {
         disableElement("notify-attendees-checkbox");
--- a/calendar/providers/gdata/components/calGoogleCalendar.js
+++ b/calendar/providers/gdata/components/calGoogleCalendar.js
@@ -286,20 +286,17 @@ calGoogleCalendar.prototype = {
                 return false;
             case "capabilities.privacy.values":
                 return ["DEFAULT", "PUBLIC", "PRIVATE"];
             case "capabilities.alarms.maxCount":
                 return 5;
             case "capabilities.alarms.actionValues":
                 return ["DISPLAY", "EMAIL", "SMS"];
             case "organizerId":
-                if (this.mSession) {
-                    return "mailto:" + this.session.userName;
-                }
-                break;
+                return "mailto:" + this.googleCalendarName;
             case "organizerCN":
                 if (this.mSession) {
                     return this.session.fullName;
                 }
                 break;
             case "itip.transport":
                 if (!this.isDefaultCalendar ||
                     !getPrefSafe("calendar.google.enableEmailInvitations", false)) {