[Pkg-owncloud-commits] [owncloud] 28/223: don't show update button when appstore is disabled or no writable dir exists

David Prévot taffit at moszumanska.debian.org
Sun Jun 22 01:54:02 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 5e9fa6481940c9220738716f9bd83345f6af91a4
Author: Georg Ehrke <developer at georgehrke.com>
Date:   Tue Jun 10 18:38:21 2014 +0200

    don't show update button when appstore is disabled or no writable dir exists
---
 lib/private/installer.php | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/private/installer.php b/lib/private/installer.php
index 1589610..96c6841 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<>'') {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list