Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added check for METHOD before checking DTSTART.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 23 Jan 2016 15:09:58 +0000 (15:09 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 23 Jan 2016 15:09:58 +0000 (15:09 +0000)
source/objects/calendarevent/CalendarEvent.cpp

index 720c7bd..e061050 100644 (file)
@@ -100,31 +100,37 @@ CalendarObjectValidResult CalendarEventObject::ValidObject(){
        
        SeekCount = 0;
        
-       // Look for DTSTART.
+       // Look for DTSTART if nothing is set for METHOD..
        
-       for (vector<string>::iterator iter = ObjectName.begin();
-               iter != ObjectName.end(); iter++){
+       if (MethodData.size() == 0){
+       
+               for (vector<string>::iterator iter = ObjectName.begin();
+                       iter != ObjectName.end(); iter++){
                        
-               try{
-                       PropertyName = ObjectName[SeekCount].substr(0,7);
-               }
+                       try{
+                               PropertyName = ObjectName[SeekCount].substr(0,7);
+                       }
                        
-               catch(const out_of_range& oor){
-                       continue;
-               }
+                       catch(const out_of_range& oor){
+                               continue;
+                       }
                
-               if (PropertyName == "DTSTART"){
+                       if (PropertyName == "DTSTART"){
                        
-                       if (ValidDateTimeStart == false){
-                               ValidDateTimeStart = true;
-                       } else {
-                               return CALENDAROBJECTVALID_INVALIDFORMAT;
-                       }
+                               if (ValidDateTimeStart == false){
+                                       ValidDateTimeStart = true;
+                               } else {
+                                       return CALENDAROBJECTVALID_INVALIDFORMAT;
+                               }
                                
-               }
+                       }
                        
-               SeekCount++;
+                       SeekCount++;
                        
+               }
+       
+       } else {
+               ValidDateTimeStart = true;
        }
        
        SeekCount = 0;
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy