diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-06-29 21:46:09 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-06-29 21:46:09 +0200 |
commit | 246894243a1be7977df66e594549b9ac25c8ebf1 (patch) | |
tree | 4a3c233853f011e80eedad6fbf617b0bca0a782d /lib/app.php | |
parent | 08e707d25821fd6111ed8f8b91aa5f77ee1b490f (diff) | |
parent | 719c7f7f6ebfe53a73eeffb07c6c23d6a788e711 (diff) | |
download | nextcloud-server-246894243a1be7977df66e594549b9ac25c8ebf1.tar.gz nextcloud-server-246894243a1be7977df66e594549b9ac25c8ebf1.zip |
Merge branch 'master' into calendar_import
Diffstat (limited to 'lib/app.php')
-rwxr-xr-x | lib/app.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/app.php b/lib/app.php index a9feff1620a..4c2c43ec26b 100755 --- a/lib/app.php +++ b/lib/app.php @@ -36,6 +36,7 @@ class OC_App{ static private $appInfo = array(); static private $appTypes = array(); static private $loadedApps = array(); + static private $checkedApps = array(); /** * @brief loads all apps @@ -349,9 +350,13 @@ class OC_App{ protected static function findAppInDirectories($appid) { + static $app_dir = array(); + if (isset($app_dir[$appid])) { + return $app_dir[$appid]; + } foreach(OC::$APPSROOTS as $dir) { if(file_exists($dir['path'].'/'.$appid)) { - return $dir; + return $app_dir[$appid]=$dir; } } } @@ -530,6 +535,10 @@ class OC_App{ * check if the app need updating and update when needed */ public static function checkUpgrade($app) { + if (in_array($app, self::$checkedApps)) { + return; + } + self::$checkedApps[] = $app; $versions = self::getAppVersions(); $currentVersion=OC_App::getAppVersion($app); if ($currentVersion) { @@ -564,7 +573,7 @@ class OC_App{ } /** - * get the installed version of all papps + * get the installed version of all apps */ public static function getAppVersions(){ static $versions; |