Skip to content
Snippets Groups Projects
Commit 6779f28a authored by Robin Appelman's avatar Robin Appelman
Browse files

cache app types during install or update

parent e03c5f39
No related branches found
No related tags found
No related merge requests found
1.1
\ No newline at end of file
1.1.1
\ No newline at end of file
0.1
\ No newline at end of file
0.2
\ No newline at end of file
0.1
\ No newline at end of file
0.2
\ No newline at end of file
0.1
\ No newline at end of file
0.2
\ No newline at end of file
0.2
\ No newline at end of file
0.2.1
\ No newline at end of file
1.0.0
\ No newline at end of file
1.0.1
\ No newline at end of file
0.1
\ No newline at end of file
0.1.1
\ No newline at end of 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);
}
/**
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment