Skip to content
Snippets Groups Projects
Commit dab58f34 authored by Bart Visscher's avatar Bart Visscher
Browse files

Cache result of OC_App::getAppVersions

parent 2f0b4983
No related branches found
No related tags found
No related merge requests found
...@@ -567,6 +567,10 @@ class OC_App{ ...@@ -567,6 +567,10 @@ class OC_App{
* get the installed version of all papps * get the installed version of all papps
*/ */
public static function getAppVersions(){ public static function getAppVersions(){
static $versions;
if (isset($versions)) { // simple cache, needs to be fixed
return $versions; // when function is used besides in checkUpgrade
}
$versions=array(); $versions=array();
$query = OC_DB::prepare( 'SELECT appid, configvalue FROM *PREFIX*appconfig WHERE configkey = \'installed_version\'' ); $query = OC_DB::prepare( 'SELECT appid, configvalue FROM *PREFIX*appconfig WHERE configkey = \'installed_version\'' );
$result = $query->execute(); $result = $query->execute();
......
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