]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remember the app root information.
authorBart Visscher <bartv@thisnet.nl>
Thu, 28 Jun 2012 19:54:33 +0000 (21:54 +0200)
committerBart Visscher <bartv@thisnet.nl>
Thu, 28 Jun 2012 20:11:04 +0000 (22:11 +0200)
lib/app.php

index 61566ed7522c46d4b3325e50d164873b15adc590..d1f12594a2511a00b3868c722d91575b8f5cbb90 100755 (executable)
@@ -350,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;
                        }
                }
        }