Commit 13bd3352 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #414 in ZP/z-push from bugfix/ZP-1091-fix-phpwarning-and-clean-code to develop

* commit '357a7acf':
  ZP-1091 Fix phpwarnings and clean code. Released under the Affero GNU General Public License (AGPL) version 3.
parents d17f6a4f 357a7acf
...@@ -736,7 +736,6 @@ class SyncCollections implements Iterator { ...@@ -736,7 +736,6 @@ class SyncCollections implements Iterator {
*/ */
private function countHierarchyChange($exportChanges = false) { private function countHierarchyChange($exportChanges = false) {
$folderid = false; $folderid = false;
$spa = $this->GetCollection($folderid);
// Check with device manager if the hierarchy should be reloaded. // Check with device manager if the hierarchy should be reloaded.
// New additional folders are loaded here. // New additional folders are loaded here.
......
...@@ -308,7 +308,7 @@ class Search extends RequestProcessor { ...@@ -308,7 +308,7 @@ class Search extends RequestProcessor {
} }
$searchprovider->Disconnect(); $searchprovider->Disconnect();
self::$topCollector->AnnounceInformation(sprintf("'%s' search found %d results", $searchname, $rows['searchtotal']), true); self::$topCollector->AnnounceInformation(sprintf("'%s' search found %d results", $searchname, (isset($rows['searchtotal']) ? $rows['searchtotal'] : 0) ), true);
self::$encoder->startWBXML(); self::$encoder->startWBXML();
self::$encoder->startTag(SYNC_SEARCH_SEARCH); self::$encoder->startTag(SYNC_SEARCH_SEARCH);
......
...@@ -52,7 +52,6 @@ class SendMail extends RequestProcessor { ...@@ -52,7 +52,6 @@ class SendMail extends RequestProcessor {
* @return boolean * @return boolean
*/ */
public function Handle($commandCode) { public function Handle($commandCode) {
$status = SYNC_COMMONSTATUS_SUCCESS;
$sm = new SyncSendMail(); $sm = new SyncSendMail();
$reply = $forward = $parent = $sendmail = $smartreply = $smartforward = false; $reply = $forward = $parent = $sendmail = $smartreply = $smartforward = false;
...@@ -141,6 +140,7 @@ class SendMail extends RequestProcessor { ...@@ -141,6 +140,7 @@ class SendMail extends RequestProcessor {
self::$topCollector->AnnounceInformation(sprintf("SendMail(): Sending email with %d bytes", strlen($sm->mime)), true); self::$topCollector->AnnounceInformation(sprintf("SendMail(): Sending email with %d bytes", strlen($sm->mime)), true);
$statusMessage = '';
try { try {
$status = self::$backend->SendMail($sm); $status = self::$backend->SendMail($sm);
} }
......
...@@ -133,9 +133,10 @@ class ZPushAdmin { ...@@ -133,9 +133,10 @@ class ZPushAdmin {
if ($fstatus !== false && isset($fstatus[ASDevice::FOLDERSYNCSTATUS])) { if ($fstatus !== false && isset($fstatus[ASDevice::FOLDERSYNCSTATUS])) {
$spa = $sc->GetCollection($folderid); $spa = $sc->GetCollection($folderid);
if ($spa) {
$total = $spa->GetFolderSyncTotal(); $total = $spa->GetFolderSyncTotal();
$todo = $spa->GetFolderSyncRemaining(); $todo = $spa->GetFolderSyncRemaining();
$fstatus['status'] = ($fstatus[ASDevice::FOLDERSYNCSTATUS] == 1)?'Initialized':'Synchronizing'; $fstatus['status'] = ($fstatus[ASDevice::FOLDERSYNCSTATUS] == 1) ? 'Initialized' : 'Synchronizing';
$fstatus['total'] = $total; $fstatus['total'] = $total;
$fstatus['done'] = $total - $todo; $fstatus['done'] = $total - $todo;
$fstatus['todo'] = $todo; $fstatus['todo'] = $todo;
...@@ -144,6 +145,7 @@ class ZPushAdmin { ...@@ -144,6 +145,7 @@ class ZPushAdmin {
} }
} }
} }
}
return $device; return $device;
} }
catch (StateNotFoundException $e) { catch (StateNotFoundException $e) {
......
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