Commit Graph

58 Commits (master)

Author SHA1 Message Date
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 week ago
John Molakvoæ b5357f7d12
Merge branch 'master' into refactor/OC-Server-getThemingDefaults
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
3 months ago
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
6 months ago
Joas Schilling 572ea18ac7
fix: Fix linkToOCSRouteAbsolute() without index.php and subfolder
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 months ago
Andrew Summers ce74bdcda2
Refactor `OC\Server::getThemingDefaults`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
9 months ago
Hamid Dehnavi d0b20534b9 Refactor "substr" calls to improve code readability
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
11 months ago
Faraz Samapoor e7cc7653b8 Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
1 year ago
Côme Chilliet 426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Christopher Ng 4f8e916585 Add label for logo link
Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 year ago
Arthur Schiwon 9f9da2eaa8
app_path cannot be empty
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2 years ago
Carl Schwan 458c2fa297
Remove OCP\App and OCP\BackgroundJob
Both deprecated since NC 23

IAppManager is the replacement for OCP\App unfortunately it can't be
dependency injected in classes used by the installed otherwise the
database connection is initialised too early

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
luz paz 368f83095d Fix typos in lib/private subdirectory
Found via `codespell -q 3 -S l10n -L jus ./lib/private`

Signed-off-by: luz paz <luzpaz@github.com>
2 years ago
Carl Schwan 6312c0df69
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Julius Härtl d68f028251
Merge pull request #27733 from PhrozenByte/enhancement/noid/IURLGenerator-linkToDefaultPageUrl 3 years ago
Louis Chemineau 18d32a1ce7 Prevent empty base URL during installation
Signed-off-by: Louis Chemineau <louis@chmn.me>
3 years ago
Jonas Meurer 7c76e85dde
Use IURLGenerator function to get value of `\OC::$WEBROOT` global
Signed-off-by: Jonas Meurer <jonas@freesources.org>
3 years ago
Daniel Rudolf a1d6189dfa
Fix UrlGeneratorTest
And again... 😒

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
3 years ago
Daniel Rudolf 15a445f743
Move UtilTest::testDefaultApps() to UrlGeneratorTest
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
3 years ago
Daniel Rudolf 12059eb65b
Add IUrlGenerator::linkToDefaultPageUrl()
Replaces the deprecated \OC_Util::getDefaultPageUrl() and makes this API public.

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
3 years ago
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Robin Appelman c048f0100f
cache baseurl in url generator
Servers don't tend to change their url in the middle of a request

Signed-off-by: Robin Appelman <robin@icewind.nl>
3 years ago
Roeland Jago Douma 72a9c35be3
Remove some IRouter methods
This is not the end. IRouter needs to burn.
But it is a start.

🎵 we didn't start the fire 🎵

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Morris Jobke 387cac4c5f
Properly inject IRouter into URLGenerator to properly encapsulate tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Morris Jobke fedf9c69d9
Use matching parameter names form interfaces and implementations
Found by Psalm 3.14.1

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
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>
4 years ago
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Arthur Schiwon b57d8b92d6
fix generation of an url to an absolute ocs route when NC in subfolder
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
5 years ago
Joas Schilling b8fcf6e9b3
Allow empty strings in getAbsoluteURL
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Roeland Jago Douma c97b4274cc
Add function to generate urls for OCS routes
fixes #11617

The OCS routes are only absolute for now as they are often exposed to
the outside anyway and are on a different endpoint than index.php in
anyway.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Morris Jobke e2cd33adfe
Fix check if theming defaults instance is available
The check in URLGenerator.php#169 and Server.php#945 are different and thus the DI container could return a \OC_Defaults object which does not provide the wanted method caising a PHP error.

Fixes #8420

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Roeland Jago Douma a3b33bea03
Make the URLGenerator strict
* Add scalar argument types
* Add return types
* Make strict
* General phpstorm cleanup

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Morris Jobke d2d73f1ce8
Also replace all other occurences
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Julius Härtl b49ab065b7
Move theming related imagePath logic to ThemingDefaults
Signed-off-by: Julius Haertl <jus@bitgrid.net>
7 years ago
Julius Härtl ce5ad7e7f4
Prefer custom theme over theming app
Signed-off-by: Julius Härtl <jus@bitgrid.net>
7 years ago
Julius Härtl f039ba7480
Add tests and inject IRequest
Signed-off-by: Julius Härtl <jus@bitgrid.net>
7 years ago
Julius Härtl 0789adaf95
Make cache and scss caching depend on the baseUrl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
7 years ago
Lukas Reschke ae6e1fe1df
Theme image for favicon-fb.png
Fixes https://github.com/nextcloud/server/issues/5322

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
7 years ago
Julius Haertl 086a5eb9d0
Check if the theming app is loaded
Signed-off-by: Julius Haertl <jus@bitgrid.net>
8 years ago
Roeland Jago Douma 9bc4ac367f
Do not trigger appconfig queries when we are not yet installed
Fixes #2209

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years ago
Lukas Reschke 8ec2e34576 Merge pull request #1602 from nextcloud/ignore-mod-env
Add system config htaccess.IgnoreFrontController for prettyURLs w/o mod_env
8 years ago
Julius Haertl 237034818d
Check if dynamic icons can be used
Signed-off-by: Julius Haertl <jus@bitgrid.net>
8 years ago
Julius Haertl 9ac5476c4e
Add cachebuster to favicons
Signed-off-by: Julius Haertl <jus@bitgrid.net>
8 years ago
Julius Haertl c7adcb85ae
Theming: Fix default parameters in icon routes
Signed-off-by: Julius Haertl <jus@bitgrid.net>
8 years ago
Julius Haertl 2d65b8c600
Theming: Add favicon-touch and fix icon creation with non svg images
Signed-off-by: Julius Haertl <jus@bitgrid.net>
8 years ago
Julius Haertl da6285b84f
Core: load favicon from theming app
Signed-off-by: Julius Haertl <jus@bitgrid.net>
8 years ago