dupondje / PHP-Push-2

Z-Push Fork With CalDAV/LDAP Support
GNU Affero General Public License v3.0
67 stars 24 forks source link

Fix for meeting status #62

Open fortiko opened 11 years ago

fortiko commented 11 years ago

There is a small mixup in code for parsing the meeting status values in caldav.php.

Here is the corrected version:

                    // SYNC_POOMCAL_MEETINGSTATUS
                    // Meetingstatus values
                    //  0 = is not a meeting
                    //  1 = is a meeting
                    //  3 = Meeting received
                    //  5 = Meeting is canceled
                    //  7 = Meeting is canceled and received
                    //  9 = as 1
                    // 11 = as 3
                    // 13 = as 5
                    // 15 = as 7                    
                                case "STATUS":
                                        switch ($property->Value())
                                        {
                                                case "TENTATIVE":
                                                        $message->meetingstatus = "3"; // was 1
                                                        break;
                                                case "CONFIRMED":
                                                        $message->meetingstatus = "1"; // was 3
                                                        break;
                                                case "CANCELLED":
                                                        $message->meetingstatus = "5"; // could also be 7
                                                        break;
                                        }
                                        break;