Commit 4ae8dedd authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #223 in ZP/z-push from...

Merge pull request #223 in ZP/z-push from bugfix/ZP-919-koe-gab-appears-wrong-in-z-push-top to develop

* commit '6da1df49':
  ZP-919 Show GAB folder with own class in z-push-top.
parents bab03281 6da1df49
......@@ -476,9 +476,12 @@ class SyncCollections implements Iterator {
if ($onlyPingable && $spa->GetPingableFlag() !== true || ! $folderid)
continue;
if (!isset($classes[$spa->GetContentClass()]))
$classes[$spa->GetContentClass()] = 0;
$classes[$spa->GetContentClass()] += 1;
// the class name will be overwritten for KOE-GAB
$class = $this->getPingClass($spa);
if (!isset($classes[$class]))
$classes[$class] = 0;
$classes[$class] += 1;
}
if (empty($classes))
$checkClasses = "policies only";
......@@ -808,6 +811,22 @@ class SyncCollections implements Iterator {
return ($this->waitingTime > 0);
}
/**
* Returns how the current folder should be called in the PING comment.
*
* @param SyncParameters $spa
*
* @access public
* @return string
*/
private function getPingClass($spa) {
$class = $spa->GetContentClass();
if ($class == "Calendar" && strpos($spa->GetFolderId(), DeviceManager::FLD_ORIGIN_GAB) === 0) {
$class = "GAB";
}
return $class;
}
/**
* Simple Iterator Interface implementation to traverse through collections
*/
......
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