]> source.dussan.org Git - nextcloud-server.git/commitdiff
cache app types during install or update
authorRobin Appelman <icewind@owncloud.com>
Mon, 14 May 2012 20:49:20 +0000 (22:49 +0200)
committerRobin Appelman <icewind@owncloud.com>
Mon, 14 May 2012 20:49:31 +0000 (22:49 +0200)
apps/files/appinfo/version
apps/files_archive/appinfo/version
apps/files_encryption/appinfo/version
apps/files_external/appinfo/version
apps/files_sharing/appinfo/version
apps/files_versions/appinfo/version
apps/user_openid/appinfo/version
lib/app.php
lib/installer.php

index b123147e2a162f34cf377f8b63d99b0e6f8887c2..8cfbc905b39f65131ba18e561d236557fbdc52cc 100644 (file)
@@ -1 +1 @@
-1.1
\ No newline at end of file
+1.1.1
\ No newline at end of file
index ceab6e11ece0bcec917c12e11d350946f085d549..2f4536184bcac31936bd15a5f9cf931dd526c022 100644 (file)
@@ -1 +1 @@
-0.1
\ No newline at end of file
+0.2
\ No newline at end of file
index ceab6e11ece0bcec917c12e11d350946f085d549..2f4536184bcac31936bd15a5f9cf931dd526c022 100644 (file)
@@ -1 +1 @@
-0.1
\ No newline at end of file
+0.2
\ No newline at end of file
index ceab6e11ece0bcec917c12e11d350946f085d549..2f4536184bcac31936bd15a5f9cf931dd526c022 100644 (file)
@@ -1 +1 @@
-0.1
\ No newline at end of file
+0.2
\ No newline at end of file
index 2f4536184bcac31936bd15a5f9cf931dd526c022..7dff5b8921122a487162febe3c8e32effb7acb35 100644 (file)
@@ -1 +1 @@
-0.2
\ No newline at end of file
+0.2.1
\ No newline at end of file
index afaf360d37fb71bcfa8cc082882f910ac2628bda..7f207341d5d9bda5ae8acfa7a6e02cdf7cd9d983 100644 (file)
@@ -1 +1 @@
-1.0.0
\ No newline at end of file
+1.0.1
\ No newline at end of file
index ceab6e11ece0bcec917c12e11d350946f085d549..6da28dde76d6550e3d398a70a9a8231256774669 100644 (file)
@@ -1 +1 @@
-0.1
\ No newline at end of file
+0.1.1
\ No newline at end of file
index 04fa0ff495d4fdc919f3baa8372862a44ea38d6e..865be5c5a1e389af2404331b96238f2ca23464ef 100644 (file)
@@ -114,19 +114,22 @@ class OC_App{
                        self::$appTypes=OC_Appconfig::getValues(false,'types');
                }
 
-               //get it from info.xml if we haven't cached it
-               if(!isset(self::$appTypes[$app])){
-                       $appData=self::getAppInfo($app);
-                       if(isset($appData['types'])){
-                               self::$appTypes[$app]=implode(',',$appData['types']);
-                       }else{
-                               self::$appTypes[$app]='';
-                       }
+               return explode(',',self::$appTypes[$app]);
+       }
 
-                       OC_Appconfig::setValue($app,'types',self::$appTypes[$app]);
+       /**
+        * read app types from info.xml and cache them in the database
+        */
+       public static function setAppTypes($app){
+               $appData=self::getAppInfo($app);
+               
+               if(isset($appData['types'])){
+                       $appTypes=implode(',',$appData['types']);
+               }else{
+                       $appTypes='';
                }
 
-               return explode(',',self::$appTypes[$app]);
+               OC_Appconfig::setValue($app,'types',$appTypes);
        }
 
        /**
@@ -542,6 +545,8 @@ class OC_App{
                foreach($appData['public'] as $name=>$path){
                        OCP\CONFIG::setAppValue('core', 'public_'.$name, '/apps/'.$appid.'/'.$path);
                }
+
+               self::setAppTypes($appid);
        }
 
        /**
index e1f30ebe272f6761115c114ae29c1fd1814f1346..731eaaa903099d7a128f43ec845a885dbefed0a0 100644 (file)
@@ -193,6 +193,9 @@ class OC_Installer{
                foreach($info['public'] as $name=>$path){
                        OCP\CONFIG::setAppValue('core', 'public_'.$name, '/apps/'.$info['id'].'/'.$path);
                }
+
+               OC_App::setAppTypes($info['id']);
+               
                return $info['id'];
        }
 
@@ -318,6 +321,9 @@ class OC_Installer{
                foreach($info['public'] as $name=>$path){
                        OCP\CONFIG::setAppValue('core', 'public_'.$name, '/apps/'.$app.'/'.$path);
                }
+               
+               OC_App::setAppTypes($info['id']);
+               
                return $info;
        }