diff options
author | Georg Ehrke <developer@georgehrke.com> | 2014-06-10 18:38:21 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2014-06-10 18:39:34 +0200 |
commit | 5e9fa6481940c9220738716f9bd83345f6af91a4 (patch) | |
tree | 3eaf5b5dc5f2b05deac910949a074b1b3a06be33 /lib | |
parent | 602404c631f4acaf3e5ae1445c4e1aa42be365c5 (diff) | |
download | nextcloud-server-5e9fa6481940c9220738716f9bd83345f6af91a4.tar.gz nextcloud-server-5e9fa6481940c9220738716f9bd83345f6af91a4.zip |
don't show update button when appstore is disabled or no writable dir exists
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/installer.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/private/installer.php b/lib/private/installer.php index 1589610aed4..96c6841c2aa 100644 --- a/lib/private/installer.php +++ b/lib/private/installer.php @@ -347,6 +347,21 @@ class OC_Installer{ * The function will check if an update for a version is available */ public static function isUpdateAvailable( $app ) { + static $isInstanceReadyForUpdates = null; + + if ($isInstanceReadyForUpdates === null) { + $installPath = OC_App::getInstallPath(); + if ($installPath === false || $installPath === null) { + $isInstanceReadyForUpdates = false; + } else { + $isInstanceReadyForUpdates = true; + } + } + + if ($isInstanceReadyForUpdates === false) { + return false; + } + $ocsid=OC_Appconfig::getValue( $app, 'ocsid', ''); if($ocsid<>'') { |