mirror of
https://github.com/nextcloud/passman.git
synced 2025-02-25 16:04:19 +08:00
Merge branch 'fix-offline-mode-requests'
This commit is contained in:
commit
9da9455e40
1 changed files with 3 additions and 1 deletions
|
@ -55,12 +55,13 @@ class Admin implements ISettings {
|
|||
* @return TemplateResponse
|
||||
*/
|
||||
public function getForm(): TemplateResponse {
|
||||
$hasInternetConnection = $this->config->getSystemValue('has_internet_connection', true);
|
||||
$checkVersion = $this->config->getAppValue('passman', 'check_version', '1') === '1';
|
||||
$localVersion = $this->appManager->getAppInfo('passman')["version"];
|
||||
$githubVersion = $this->l->t('Unable to get version info');
|
||||
$githubReleaseUrl = null;
|
||||
|
||||
if ($checkVersion) {
|
||||
if ($checkVersion && $hasInternetConnection) {
|
||||
// get latest GitHub release version
|
||||
|
||||
$url = 'https://api.github.com/repos/nextcloud/passman/releases/latest';
|
||||
|
@ -90,6 +91,7 @@ class Admin implements ISettings {
|
|||
'githubVersion' => $githubVersion,
|
||||
'githubReleaseUrl' => $githubReleaseUrl,
|
||||
'checkVersion' => $checkVersion,
|
||||
'hasInternetConnection' => $hasInternetConnection,
|
||||
], 'blank');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue