The main issue with using the general theming- prefix is that with APCu caching
the cache is not shared between processes, so when trying to reset the cache
through the CLI, e.g. when updating the theming config the old cache is never
invalidated.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
If an SVG is requested and the app config value for logoMime is set then the logo is there. Otherwise we need to check it and maybe also generate a PNG from the SVG (that's done in getImage() which needs to be called then).
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
In the environment where php-imagick with SVG support is correctly installed, this endpoint returns 512x512 image.
d9015a8c94/apps/theming/lib/Controller/IconController.php (L146)
The problem is in the environment without php-imagick or without SVG support, this will fall back to original, whose default is 128x128; but I thought this is a separate problem. (For this, default image may be enlarged. Should I create another issue if this is important one?)
Signed-off-by: nhirokinet <nhirokinet@nhiroki.net>
A bit more elegant. Plus it will allow us to also write a proper
@nextcloud/theming package. To make life easier down the line for all.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not do translations in the constructor. This gets called to early
so there is no user yet. Which means we can't obtain the locale. Which
means we store the wrong translation instance.
* Same for the theming app magic. Just use the parent call when needed.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
In some circumstances the url generation seems to fail,
resulting in an empty image url which causes the browser to load the main
page multiple times, leading to issues with state tokens
Signed-off-by: Robin Appelman <robin@icewind.nl>