From 4f9b76d821ca2e113d211ef59e90965e3d4f22e0 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 17 Mar 2015 12:47:46 +0100 Subject: [PATCH] Read theme only if required --- lib/private/urlgenerator.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/urlgenerator.php b/lib/private/urlgenerator.php index 8e65858547c..b0de54caebe 100644 --- a/lib/private/urlgenerator.php +++ b/lib/private/urlgenerator.php @@ -117,15 +117,15 @@ class URLGenerator implements IURLGenerator { * Returns the path to the image. */ public function imagePath($app, $image) { - // Read the selected theme from the config file - $theme = \OC_Util::getTheme(); - $cache = $this->cacheFactory->create('imagePath'); $cacheKey = $app.'-'.$image; if($cache->hasKey($cacheKey)) { return $cache->get($cacheKey); } + // Read the selected theme from the config file + $theme = \OC_Util::getTheme(); + //if a theme has a png but not an svg always use the png $basename = substr(basename($image),0,-4);