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

David Prévot taffit at moszumanska.debian.org
Fri Nov 28 22:47:49 UTC 2014


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

taffit pushed a commit to branch master
in repository php-sabredav.

commit 3f9b7ef32e16bf0dab735840d1c96d2a2630adda
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 e4f04c5..f762e63 100644
--- a/lib/CalDAV/Schedule/Plugin.php
+++ b/lib/CalDAV/Schedule/Plugin.php
@@ -294,8 +294,7 @@ class Plugin extends ServerPlugin {
             $oldObj = null;
         }
 
-        $this->processICalendarChange($oldObj, $vCal, $addresses);
-        $modified = true;
+        $this->processICalendarChange($oldObj, $vCal, $addresses, [], $modified);
 
     }
 
@@ -512,13 +511,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