Commit 5eb0df2b authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-976 Don't fail completely if a state is not found.

Released under the Affero GNU General Public License (AGPL) version 3.
parent fff0d24c
...@@ -108,7 +108,13 @@ class ZPushAdmin { ...@@ -108,7 +108,13 @@ class ZPushAdmin {
// load all collections of device also loading states and loading hierarchy, but not checking permissions // load all collections of device also loading states and loading hierarchy, but not checking permissions
$sc->LoadAllCollections(true, true, false, true); $sc->LoadAllCollections(true, true, false, true);
}
catch (StateInvalidException $sive) {
ZLog::Write(LOGLEVEL_WARN, sprintf("ZPushAdmin::GetDeviceDetails(): device '%s' of user '%s' has invalid states. Please sync to solve this issue.", $devid, $user));
$device->SetDeviceError("Invalid states. Please force synchronization!");
}
if ($sc) {
if ($sc->GetLastSyncTime()) if ($sc->GetLastSyncTime())
$device->SetLastSyncTime($sc->GetLastSyncTime()); $device->SetLastSyncTime($sc->GetLastSyncTime());
...@@ -131,11 +137,6 @@ class ZPushAdmin { ...@@ -131,11 +137,6 @@ class ZPushAdmin {
} }
} }
} }
catch (StateInvalidException $sive) {
ZLog::Write(LOGLEVEL_WARN, sprintf("ZPushAdmin::GetDeviceDetails(): device '%s' of user '%s' has invalid states. Please sync to solve this issue.", $devid, $user));
$device->SetDeviceError("Invalid states. Please force synchronization!");
}
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