aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/URLGenerator.php
Commit message (Collapse)AuthorAgeFilesLines
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-4/+4
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(setup-checks): Ensure URL with webroot worksFerdinand Thiessen2024-09-131-2/+2
| | | | | | | | | | | We basically mock the way `URLGenerator::getAbsoluteURL` works, so we must make sure that the URL might already contain the webroot. Because `baseURL` and `cliURL` also contain the webroot we need to remove the webroot from the URL first. Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Daniel <mail@danielkesselberg.de> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(URLGenerator): Use NavigationManager to generate default page URLprovokateurin2024-09-091-6/+19
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-2/+2
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-241-35/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Merge branch 'master' into refactor/OC-Server-getThemingDefaultsJohn Molakvoæ2024-02-231-8/+17
|\ | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-4/+4
| | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
| * fix: Fix linkToOCSRouteAbsolute() without index.php and subfolderJoas Schilling2023-11-201-3/+12
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Refactor "substr" calls to improve code readabilityHamid Dehnavi2023-07-071-1/+1
| | | | | | | | Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
* | Refactor `OC\Server::getThemingDefaults`Andrew Summers2023-08-291-2/+2
|/ | | | Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
* Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-151-3/+3
| | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-051-4/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add label for logo linkChristopher Ng2023-03-291-17/+1
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* app_path cannot be emptyArthur Schiwon2022-08-241-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Remove OCP\App and OCP\BackgroundJobCarl Schwan2022-08-011-7/+28
| | | | | | | | | | 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>
* Fix typos in lib/private subdirectoryluz paz2022-07-271-1/+1
| | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/private` Signed-off-by: luz paz <luzpaz@github.com>
* Check style updateCarl Schwan2022-01-131-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge pull request #27733 from ↵Julius Härtl2021-10-051-0/+49
|\ | | | | | | PhrozenByte/enhancement/noid/IURLGenerator-linkToDefaultPageUrl
| * Fix UrlGeneratorTestDaniel Rudolf2021-08-051-7/+2
| | | | | | | | | | | | And again... :unamused: Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
| * Move UtilTest::testDefaultApps() to UrlGeneratorTestDaniel Rudolf2021-07-011-4/+11
| | | | | | | | Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
| * Add IUrlGenerator::linkToDefaultPageUrl()Daniel Rudolf2021-06-301-0/+47
| | | | | | | | | | | | Replaces the deprecated \OC_Util::getDefaultPageUrl() and makes this API public. Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
* | Prevent empty base URL during installationLouis Chemineau2021-09-291-1/+2
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Use IURLGenerator function to get value of `\OC::$WEBROOT` globalJonas Meurer2021-08-161-0/+7
|/ | | | Signed-off-by: Jonas Meurer <jonas@freesources.org>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* cache baseurl in url generatorRobin Appelman2021-03-101-1/+6
| | | | | | Servers don't tend to change their url in the middle of a request Signed-off-by: Robin Appelman <robin@icewind.nl>
* Remove some IRouter methodsRoeland Jago Douma2020-11-171-3/+3
| | | | | | | | | 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>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-11/+11
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Properly inject IRouter into URLGenerator to properly encapsulate testsMorris Jobke2020-08-191-9/+8
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use matching parameter names form interfaces and implementationsMorris Jobke2020-08-191-42/+45
| | | | | | Found by Psalm 3.14.1 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-7/+6
| | | | | | | | | | | | | | | 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>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-3/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix generation of an url to an absolute ocs route when NC in subfolderArthur Schiwon2019-11-291-2/+3
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Allow empty strings in getAbsoluteURLJoas Schilling2018-11-201-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add function to generate urls for OCS routesRoeland Jago Douma2018-10-091-0/+13
| | | | | | | | | | 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>
* Fix check if theming defaults instance is availableMorris Jobke2018-02-271-1/+5
| | | | | | | | 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>
* Make the URLGenerator strictRoeland Jago Douma2018-01-141-19/+17
| | | | | | | | | * Add scalar argument types * Add return types * Make strict * General phpstorm cleanup Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Also replace all other occurencesMorris Jobke2017-12-181-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headersMorris Jobke2017-11-061-1/+3
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Move theming related imagePath logic to ThemingDefaultsJulius Härtl2017-09-121-8/+7
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Prefer custom theme over theming appJulius Härtl2017-07-121-13/+9
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add tests and inject IRequestJulius Härtl2017-06-161-3/+9
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Make cache and scss caching depend on the baseUrlJulius Härtl2017-06-151-7/+13
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Theme image for favicon-fb.pngLukas Reschke2017-06-091-4/+8
| | | | | | Fixes https://github.com/nextcloud/server/issues/5322 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Check if the theming app is loadedJulius Haertl2016-12-091-1/+1
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Do not trigger appconfig queries when we are not yet installedRoeland Jago Douma2016-11-211-2/+3
| | | | | | Fixes #2209 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #1602 from nextcloud/ignore-mod-envLukas Reschke2016-11-181-1/+2
|\ | | | | Add system config htaccess.IgnoreFrontController for prettyURLs w/o mod_env
| * Add system config htaccess.IgnoreFrontController for prettyURLs w/o mod_envFelix Epp2016-11-161-1/+2
| | | | | | | | | | | | | | Added the system config which sets all conditions to true that query the FrontControllerActive mod_env variable. Signed-off-by: Felix A. Epp <work@felixepp.de>