Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-29 17:10:53 +0300
committerJulius Härtl <jus@bitgrid.net>2018-07-19 09:16:57 +0300
commit29ff7efe9a5be16b133a1ee4e43d6d2155b6a21c (patch)
tree55f1645f13a1f5f2e0591e67dc62d23048f4a5a7 /core/Controller
parent98a0113d4083d4dff73f8212106673ccc1c4b744 (diff)
Svg icon api sass function and upgrade of all styles
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/SvgController.php12
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();