[Pkg-owncloud-commits] [owncloud] 95/121: Extend OC_Util::needUpgrade to also catch app upgrades

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 16:44:39 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 c69215c1151814b1ba71d4a2f198231a596b56e0
Author: Robin Appelman <icewind at owncloud.com>
Date:   Thu Jul 24 17:15:38 2014 +0200

    Extend OC_Util::needUpgrade to also catch app upgrades
---
 lib/private/util.php | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/lib/private/util.php b/lib/private/util.php
index 0be6187..0696a79 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -1465,7 +1465,18 @@ class OC_Util {
 		if (OC_Config::getValue('installed', false)) {
 			$installedVersion = OC_Config::getValue('version', '0.0.0');
 			$currentVersion = implode('.', OC_Util::getVersion());
-			return version_compare($currentVersion, $installedVersion, '>');
+			if (version_compare($currentVersion, $installedVersion, '>')) {
+				return true;
+			}
+
+			// also check for upgrades for apps
+			$apps = \OC_App::getEnabledApps();
+			foreach ($apps as $app) {
+				if (\OC_App::shouldUpgrade($app)) {
+					return true;
+				}
+			}
+			return false;
 		} else {
 			return false;
 		}

-- 
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