mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-14 00:54:18 +08:00
Nextcloud auto-update plugin when on admin page
This commit is contained in:
parent
b690370557
commit
5b38bf3b17
1 changed files with 7 additions and 0 deletions
|
@ -53,6 +53,13 @@ class AdminSettings implements ISettings
|
||||||
|
|
||||||
$parameters['snappymail-debug'] = $oConfig->Get('debug', 'enable', false);
|
$parameters['snappymail-debug'] = $oConfig->Get('debug', 'enable', false);
|
||||||
|
|
||||||
|
// Check for nextcloud plugin update, if so then update
|
||||||
|
foreach (\SnappyMail\Repository::getPackagesList()['List'] as $plugin) {
|
||||||
|
if ('nextcloud' == $plugin['id'] && $plugin['canBeUpdated']) {
|
||||||
|
\SnappyMail\Repository::installPackage('plugin', 'nextcloud');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
\OCP\Util::addScript('snappymail', 'snappymail');
|
\OCP\Util::addScript('snappymail', 'snappymail');
|
||||||
return new TemplateResponse('snappymail', 'admin-local', $parameters);
|
return new TemplateResponse('snappymail', 'admin-local', $parameters);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue