Commit f04adc35 authored by mku's avatar mku

ZP-234 #comment Incoming message actions should include the message counter #time 20m

git-svn-id: https://z-push.org/svn/z-push/trunk@1461 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 344d0a89
...@@ -428,7 +428,7 @@ class Sync extends RequestProcessor { ...@@ -428,7 +428,7 @@ class Sync extends RequestProcessor {
$status = $this->getImporter($sc, $spa, $actiondata); $status = $this->getImporter($sc, $spa, $actiondata);
if ($status == SYNC_STATUS_SUCCESS) if ($status == SYNC_STATUS_SUCCESS)
$this->importMessage($spa, $actiondata, $element[EN_TAG], $message, $clientid, $serverid, $foldertype); $this->importMessage($spa, $actiondata, $element[EN_TAG], $message, $clientid, $serverid, $foldertype, $nchanges);
else else
ZLog::Write(LOGLEVEL_WARN, "Ignored incoming change, global status indicates problem."); ZLog::Write(LOGLEVEL_WARN, "Ignored incoming change, global status indicates problem.");
...@@ -1020,12 +1020,13 @@ class Sync extends RequestProcessor { ...@@ -1020,12 +1020,13 @@ class Sync extends RequestProcessor {
* @param string $clientid Client message identifier * @param string $clientid Client message identifier
* @param string $serverid Server message identifier * @param string $serverid Server message identifier
* @param string $foldertype On sms sync, this says "SMS", else false * @param string $foldertype On sms sync, this says "SMS", else false
* @param integer $messageCount Counter of already imported messages
* *
* @access private * @access private
* @throws StatusException in case the importer is not available * @throws StatusException in case the importer is not available
* @return - Message related status are returned in the actiondata. * @return - Message related status are returned in the actiondata.
*/ */
private function importMessage($spa, &$actiondata, $todo, $message, $clientid, $serverid, $foldertype) { private function importMessage($spa, &$actiondata, $todo, $message, $clientid, $serverid, $foldertype, $messageCount) {
// the importer needs to be available! // the importer needs to be available!
if ($this->importer == false) if ($this->importer == false)
throw StatusException(sprintf("Sync->importMessage(): importer not available", SYNC_STATUS_SERVERERROR)); throw StatusException(sprintf("Sync->importMessage(): importer not available", SYNC_STATUS_SERVERERROR));
...@@ -1065,7 +1066,7 @@ class Sync extends RequestProcessor { ...@@ -1065,7 +1066,7 @@ class Sync extends RequestProcessor {
if (!$ignoreMessage) { if (!$ignoreMessage) {
switch($todo) { switch($todo) {
case SYNC_MODIFY: case SYNC_MODIFY:
self::$topCollector->AnnounceInformation("Saving modified message"); self::$topCollector->AnnounceInformation(sprintf("Saving modified message %d", $messageCount));
try { try {
$actiondata["modifyids"][] = $serverid; $actiondata["modifyids"][] = $serverid;
...@@ -1103,7 +1104,7 @@ class Sync extends RequestProcessor { ...@@ -1103,7 +1104,7 @@ class Sync extends RequestProcessor {
break; break;
case SYNC_ADD: case SYNC_ADD:
self::$topCollector->AnnounceInformation("Creating new message from mobile"); self::$topCollector->AnnounceInformation(sprintf("Creating new message from mobile %d", $messageCount));
try { try {
// ignore sms messages // ignore sms messages
if ($foldertype == "SMS") { if ($foldertype == "SMS") {
...@@ -1129,7 +1130,7 @@ class Sync extends RequestProcessor { ...@@ -1129,7 +1130,7 @@ class Sync extends RequestProcessor {
} }
break; break;
case SYNC_REMOVE: case SYNC_REMOVE:
self::$topCollector->AnnounceInformation("Deleting message removed on mobile"); self::$topCollector->AnnounceInformation(sprintf("Deleting message removed on mobile %d", $messageCount));
try { try {
$actiondata["removeids"][] = $serverid; $actiondata["removeids"][] = $serverid;
// ignore sms messages // ignore sms messages
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment