|
|
|
|
@ -67,7 +67,7 @@ class UpdateAvailableNotifications extends TimedJob {
|
|
|
|
|
/**
|
|
|
|
|
* Check for Nextcloud server update
|
|
|
|
|
*/
|
|
|
|
|
protected function checkCoreUpdate() {
|
|
|
|
|
protected function checkCoreUpdate(): void {
|
|
|
|
|
if (!$this->config->getSystemValueBool('updatechecker', true)) {
|
|
|
|
|
// update checker is disabled so no core update check!
|
|
|
|
|
return;
|
|
|
|
|
@ -100,7 +100,7 @@ class UpdateAvailableNotifications extends TimedJob {
|
|
|
|
|
* Send a message to the admin when the update server could not be reached
|
|
|
|
|
* @param int $numDays
|
|
|
|
|
*/
|
|
|
|
|
protected function sendErrorNotifications($numDays) {
|
|
|
|
|
protected function sendErrorNotifications($numDays): void {
|
|
|
|
|
$this->clearErrorNotifications();
|
|
|
|
|
|
|
|
|
|
$notification = $this->notificationManager->createNotification();
|
|
|
|
|
@ -122,7 +122,7 @@ class UpdateAvailableNotifications extends TimedJob {
|
|
|
|
|
/**
|
|
|
|
|
* Remove error notifications again
|
|
|
|
|
*/
|
|
|
|
|
protected function clearErrorNotifications() {
|
|
|
|
|
protected function clearErrorNotifications(): void {
|
|
|
|
|
$notification = $this->notificationManager->createNotification();
|
|
|
|
|
try {
|
|
|
|
|
$notification->setApp(Application::APP_NAME)
|
|
|
|
|
@ -137,7 +137,7 @@ class UpdateAvailableNotifications extends TimedJob {
|
|
|
|
|
/**
|
|
|
|
|
* Check all installed apps for updates
|
|
|
|
|
*/
|
|
|
|
|
protected function checkAppUpdates() {
|
|
|
|
|
protected function checkAppUpdates(): void {
|
|
|
|
|
$apps = $this->appManager->getEnabledApps();
|
|
|
|
|
foreach ($apps as $app) {
|
|
|
|
|
$update = $this->isUpdateAvailable($app);
|
|
|
|
|
@ -154,7 +154,7 @@ class UpdateAvailableNotifications extends TimedJob {
|
|
|
|
|
* @param string $version
|
|
|
|
|
* @param string $visibleVersion
|
|
|
|
|
*/
|
|
|
|
|
protected function createNotifications($app, $version, $visibleVersion = '') {
|
|
|
|
|
protected function createNotifications($app, $version, $visibleVersion = ''): void {
|
|
|
|
|
$lastNotification = $this->appConfig->getAppValueString($app, '');
|
|
|
|
|
if ($lastNotification === $version) {
|
|
|
|
|
// We already notified about this update
|
|
|
|
|
@ -218,7 +218,7 @@ class UpdateAvailableNotifications extends TimedJob {
|
|
|
|
|
* @param string $app
|
|
|
|
|
* @param string $version
|
|
|
|
|
*/
|
|
|
|
|
protected function deleteOutdatedNotifications($app, $version) {
|
|
|
|
|
protected function deleteOutdatedNotifications($app, $version): void {
|
|
|
|
|
$notification = $this->notificationManager->createNotification();
|
|
|
|
|
try {
|
|
|
|
|
$notification->setApp(Application::APP_NAME)
|
|
|
|
|
|