diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-29 16:10:53 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-07-19 08:16:57 +0200 |
commit | 29ff7efe9a5be16b133a1ee4e43d6d2155b6a21c (patch) | |
tree | 55f1645f13a1f5f2e0591e67dc62d23048f4a5a7 /core/Controller/SvgController.php | |
parent | 98a0113d4083d4dff73f8212106673ccc1c4b744 (diff) | |
download | nextcloud-server-29ff7efe9a5be16b133a1ee4e43d6d2155b6a21c.tar.gz nextcloud-server-29ff7efe9a5be16b133a1ee4e43d6d2155b6a21c.zip |
Svg icon api sass function and upgrade of all styles
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/Controller/SvgController.php')
-rw-r--r-- | core/Controller/SvgController.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/Controller/SvgController.php b/core/Controller/SvgController.php index 6fba2f050b3..26cead8913e 100644 --- a/core/Controller/SvgController.php +++ b/core/Controller/SvgController.php @@ -55,12 +55,13 @@ class SvgController extends Controller { * * Generate svg from filename with the requested color * + * @param string $folder * @param string $fileName * @param string $color * @return DataDisplayResponse|NotFoundException */ - public function getSvgFromCore(string $fileName, string $color = 'ffffff') { - $path = $this->serverRoot . "/core/img/actions/$fileName.svg"; + public function getSvgFromCore(string $folder, string $fileName, string $color = 'ffffff') { + $path = $this->serverRoot . "/core/img/$folder/$fileName.svg"; return $this->getSvg($path, $color); } @@ -70,11 +71,18 @@ class SvgController extends Controller { * * Generate svg from filename with the requested color * + * @param string $app * @param string $fileName * @param string $color * @return DataDisplayResponse|NotFoundException */ public function getSvgFromApp(string $app, string $fileName, string $color = 'ffffff') { + + if ($app === 'settings') { + $path = $this->serverRoot . "/settings/img/$fileName.svg"; + return $this->getSvg($path, $color); + } + $appPath = \OC_App::getAppWebPath($app); if (!$appPath) { return new NotFoundResponse(); |