mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Use only app path to get the icon on the svg api
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
b9628e74fc
commit
8a8ef211c8
1 changed files with 4 additions and 3 deletions
|
|
@ -89,13 +89,14 @@ class SvgController extends Controller {
|
|||
return $this->getSvg($path, $color, $fileName);
|
||||
}
|
||||
|
||||
// e.g /var/www/html/custom_apps/contacts
|
||||
// or outside root /var/www/apps/files
|
||||
$appRootPath = $this->appManager->getAppPath($app);
|
||||
$appPath = substr($appRootPath, strlen($this->serverRoot));
|
||||
|
||||
if (!$appPath) {
|
||||
if (!$appRootPath) {
|
||||
return new NotFoundResponse();
|
||||
}
|
||||
$path = $this->serverRoot . $appPath ."/img/$fileName.svg";
|
||||
$path = $appRootPath ."/img/$fileName.svg";
|
||||
return $this->getSvg($path, $color, $fileName);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue