diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-03-17 12:47:46 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-03-17 12:47:46 +0100 |
commit | 4f9b76d821ca2e113d211ef59e90965e3d4f22e0 (patch) | |
tree | 35506cb07fc3d00f5ae9a51d511f78ac2e2aa00c /lib/private/urlgenerator.php | |
parent | 9e2ebf2dcea8d3e1ee153eba43124ca95c496443 (diff) | |
download | nextcloud-server-4f9b76d821ca2e113d211ef59e90965e3d4f22e0.tar.gz nextcloud-server-4f9b76d821ca2e113d211ef59e90965e3d4f22e0.zip |
Read theme only if required
Diffstat (limited to 'lib/private/urlgenerator.php')
-rw-r--r-- | lib/private/urlgenerator.php | 6 |
1 files 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); |