Small update in update routine.

This commit is contained in:
James Cole 2018-01-21 11:09:55 +01:00
parent eb76ed5591
commit 0bc688795a
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -91,6 +91,7 @@ class VersionCheckEventHandler
} catch (FireflyException $e) { } catch (FireflyException $e) {
Log::error(sprintf('Could not check for updates: %s', $e->getMessage())); Log::error(sprintf('Could not check for updates: %s', $e->getMessage()));
} }
$string = 'no result: ' . $check;
if ($check === -2) { if ($check === -2) {
$string = strval(trans('firefly.update_check_error')); $string = strval(trans('firefly.update_check_error'));
} }
@ -103,6 +104,9 @@ class VersionCheckEventHandler
['your_version' => $current, 'new_version' => $first->getTitle(), 'date' => $first->getUpdated()->formatLocalized($monthAndDayFormat)] ['your_version' => $current, 'new_version' => $first->getTitle(), 'date' => $first->getUpdated()->formatLocalized($monthAndDayFormat)]
) )
); );
}
if ($check !== 0) {
// flash info
session()->flash('info', $string); session()->flash('info', $string);
} }