aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-26 20:53:28 +0200
committerBart Visscher <bartv@thisnet.nl>2012-06-27 01:05:12 +0200
commitdab58f3464ec8aded5e0da4b050e5ee3d0bc5cfc (patch)
tree08eab31fbc8fe257f762ea72ab38093e7f9aac03
parent2f0b4983e9019bb4a129f5578cf0a3ced1dab4d7 (diff)
downloadnextcloud-server-dab58f3464ec8aded5e0da4b050e5ee3d0bc5cfc.tar.gz
nextcloud-server-dab58f3464ec8aded5e0da4b050e5ee3d0bc5cfc.zip
Cache result of OC_App::getAppVersions
-rwxr-xr-xlib/app.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/app.php b/lib/app.php
index be17beeacc5..a9feff1620a 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -567,6 +567,10 @@ class OC_App{
* get the installed version of all papps
*/
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();
$query = OC_DB::prepare( 'SELECT appid, configvalue FROM *PREFIX*appconfig WHERE configkey = \'installed_version\'' );
$result = $query->execute();