[Pkg-owncloud-commits] [php-sabredav] 22/64: Only marking iCalendar objects as modified when they generate scheduling messags.

David Prévot taffit at moszumanska.debian.org
Thu Dec 11 15:13:23 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag 2.2.0alpha1
in repository php-sabredav.

commit 7fce5c9cd5114f1562c0e0399a5ac5dfb35735bc
Author: Evert Pot <me at evertpot.com>
Date:   Wed Nov 19 15:41:32 2014 -0500

    Only marking iCalendar objects as modified when they generate scheduling
    messags.
    
    Fixes #547.
---
 lib/CalDAV/Schedule/Plugin.php | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/CalDAV/Schedule/Plugin.php b/lib/CalDAV/Schedule/Plugin.php
index fb2a0b7..19604d4 100644
--- a/lib/CalDAV/Schedule/Plugin.php
+++ b/lib/CalDAV/Schedule/Plugin.php
@@ -291,8 +291,7 @@ class Plugin extends ServerPlugin {
             $oldObj = null;
         }
 
-        $this->processICalendarChange($oldObj, $vCal, $addresses);
-        $modified = true;
+        $this->processICalendarChange($oldObj, $vCal, $addresses, [], $modified);
 
     }
 
@@ -509,13 +508,17 @@ class Plugin extends ServerPlugin {
      * @param VCalendar $newObject
      * @param array $addresses
      * @param array $ignore Any addresses to not send messages to.
+     * @param boolean $modified A marker to indicate that the original object
+     *   modified by this process.
      * @return void
      */
-    protected function processICalendarChange($oldObject = null, VCalendar $newObject, array $addresses, array $ignore = []) {
+    protected function processICalendarChange($oldObject = null, VCalendar $newObject, array $addresses, array $ignore = [], &$modified = false) {
 
         $broker = new ITip\Broker();
         $messages = $broker->parseEvent($newObject, $addresses, $oldObject);
 
+        if ($messages) $modified = true;
+
         foreach($messages as $message) {
 
             if (in_array($message->recipient, $ignore)) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list