Fix bug 1074159 - Freebusy requests fail with Google CalDAV if the first calendar in the realm is disabled. r=mmecca
authorPhilipp Kewisch <mozilla@kewis.ch>
Mon, 06 Oct 2014 19:21:37 +0200
changeset 17037 f333d6ce03ca6875cf747e5d3f2902abb094f9d9
parent 17036 d351cea9d237b46a1aa56400f4219611b31b8f3f
child 17038 fa75ea17aa0e105d1125c893168bc58d007c8804
push id10567
push useraleth@instantbird.org
push dateSat, 08 Nov 2014 12:10:32 +0000
treeherdercomm-central@d4867034dba9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmmecca
bugs1074159
Fix bug 1074159 - Freebusy requests fail with Google CalDAV if the first calendar in the realm is disabled. r=mmecca
calendar/providers/caldav/calDavCalendar.js
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.js
@@ -1459,17 +1459,17 @@ calDavCalendar.prototype = {
 
     refresh: function caldav_refresh() {
         this.replayChangesOn(null);
     },
 
     firstInRealm: function caldav_firstInRealm() {
         var calendars = getCalendarManager().getCalendars({});
         for (var i = 0; i < calendars.length ; i++) {
-            if (calendars[i].type != "caldav") {
+            if (calendars[i].type != "caldav" || calendars[i].getProperty("disabled")) {
                 continue;
             }
             // XXX We should probably expose the inner calendar via an
             // interface, but for now use wrappedJSObject.
             var calendar = calendars[i].wrappedJSObject;
             if (calendar.mUncachedCalendar) {
                 calendar = calendar.mUncachedCalendar;
             }