Author: ralfbecker
New Revision: 55116
URL: http://svn.stylite.de/viewvc/egroupware?rev=55116&view=rev
Log:
fix docu and logging as logic for change is in backend
Modified:
trunk/calendar/inc/class.calendar_bo.inc.php
trunk/calendar/inc/class.calendar_zpush.inc.php
— trunk/calendar/inc/class.calendar_bo.inc.php (original)
+++ trunk/calendar/inc/class.calendar_bo.inc.php Tue Feb 23 16:04:30 2016
@@ -2070,7 +2070,7 @@
$users = $this->resolve_users($user);
$ctag = $users ? $this->so->get_ctag($users, $filter == ‘owner’, $master_only) : 0; // no rights, return 0 as ctag (otherwise we get SQL error!)
-
if ($this->debug > 1) error_log(__METHOD__. "($user, '$filter', $master_only) = $ctag = ".date('Y-m-d H:i:s',$ctag)." took ".(microtime(true)-$startime)." secs");
return $ctag;
}
— trunk/calendar/inc/class.calendar_zpush.inc.php (original)
+++ trunk/calendar/inc/class.calendar_zpush.inc.php Tue Feb 23 16:04:30 2016
@@ -1297,33 +1297,22 @@
* if changes occurr default diff engine computes the actual changes
*
* @param string $folderid
-
-
@param string &$syncstate on call old syncstate, on return new syncstate
-
-
@return array|boolean false if $folderid not found, array() if no changes or array(array(“type” => “fakeChange”))
-
-
@param string &$syncstate on return new syncstate
*/
function AlterPingChanges($folderid, &$syncstate)
{
$type = $owner = null;
$this->backend->splitID($folderid, $type, $owner);
-
ZLog::Write(LOGLEVEL_DEBUG, __METHOD__."('$folderid','$syncstate') type='$type', owner=$owner");
if ($type != 'calendar') return false;
if (!isset($this->calendar)) $this->calendar = new calendar_boupdate();
//$ctag = $this->calendar->get_ctag($owner,'owner',true); // true only consider recurrence master
-
$ctag = $this->calendar->get_ctag($owner,false,true); // we only want to fetch the owners events, where he is a participant too
-
$syncstate = $this->calendar->get_ctag($owner,false,true); // we only want to fetch the owners events, where he is a participant too
// workaround for syncstate = 0 when calendar is empty causes synctate to not return 0 but array resulting in foldersync loop
-
if ($ctag == 0) $ctag = 1;
-
$changes = array(); // no change
-
$syncstate_was = $syncstate;
-
-
if ($ctag !== $syncstate)
-
{
-
$syncstate = $ctag;
-
$changes = array(array('type' => 'fakeChange'));
-
}
-
//error_log(__METHOD__."('$folderid','$syncstate_was') syncstate='$syncstate' returning ".array2string($changes));
-
ZLog::Write(LOGLEVEL_DEBUG, __METHOD__."('$folderid','$syncstate_was') syncstate='$syncstate' returning ".array2string($changes));
-
return $changes;
-
if ($syncstate == 0) $syncstate = 1;
-
-
ZLog::Write(LOGLEVEL_DEBUG, __METHOD__."('$folderid', ...) type='$type', owner=$owner --> syncstate='$syncstate'");
}
/**
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs