summaryrefslogtreecommitdiffstats
path: root/core/Controller/PreviewController.php
Commit message (Collapse)AuthorAgeFilesLines
* Fix type of PreviewController::$userIdVarun Patil2022-11-241-1/+1
| | | | | | Can be null if not logged in; currently crashes Signed-off-by: Varun Patil <varunpatil@ucla.edu>
* Check share attributes on preview endpointsJulius Härtl2022-10-251-0/+11
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update core to PHP 7.4 standardCarl Schwan2022-05-201-39/+3
| | | | | | | - Typed properties - Port to LoggerInterface Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Improve caching policyCarl Schwan2022-02-161-2/+4
| | | | | | | | | | | | | | * Cache css with version in url. This makes most js and css requests to be cached by the browser * Force caching previews, the etag is in the url so that if the propfind gives a new etag, we will refresh it otherwise it's no use to try to fetch the new etag and do tons of DB queries Tested with firefox and 'debug' => false (important so that the js/css urls are generated with ?v= parameter) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge pull request #26494 from rigrig/fix-php8-deprecationsMorris Jobke2021-06-071-2/+2
|\ | | | | Fix some php 8 warnings
| * Fix functions taking optional parameters before required onesRichard de Boer2021-05-291-2/+2
| | | | | | | | | | | | | | PHP 8 shows deprecation warnings about this, see #25806 Removes the "default" values, as they actually are required parameters anyway. Signed-off-by: Richard de Boer <git@tubul.net>
* | Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+1
|/ | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-4/+0
| | | | | | | | | | | | | | | 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>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-1/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-2/+2
| | | | | | | | | | | * 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>
* Update PreviewControllerRoeland Jago Douma2019-07-261-6/+1
| | | | | | | | | | | | | The constructor is called with the userId. However if a user is not logged in this is null. Which means that we get an exception instead of this being handled gracefully in the middleware. There are cleaner solutions. But this is the solution that is the easiest to apply without lots of work and risk of breaking things (handling the logged in middleware before initializing the controller etc). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix usageRoeland Jago Douma2018-06-041-10/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add preview endpoint for the fileidRoeland Jago Douma2018-01-241-14/+75
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersMorris Jobke2017-11-061-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Handle more error casesMorris Jobke2017-05-021-0/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add cache 1 day cache to preview endpointRoeland Jago Douma2016-11-031-2/+20
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* More testsRoeland Jago Douma2016-11-031-7/+4
| | | | | | | | | * PreviewController test * PublicPreview test * Versions Preview test * Trash Preview test Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move Ipreview to more of DI thingyRoeland Jago Douma2016-11-031-27/+21
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move fileRoeland Jago Douma2016-11-031-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move preview endpoint to controllerRoeland Jago Douma2016-11-031-0/+123
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>