aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix incorrect if conditions in ViewCôme Chilliet2022-04-051-3/+3
| | | | | | | | | | ($something->getPermissions() && Constants::PERMISSION_READ) does not make sense as PERMISSION_READ contant is 1 this will always evaluate to true. getPersmissions is returning an int which is a bitwise combination as documented in the interface, so it should be used with bit operators. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add dav plugin to trigger recalculating of checksumsRobin Appelman2022-03-311-0/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* type fixesRobin Appelman2022-03-041-12/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* move teardown logic to SetupManagerRobin Appelman2022-03-041-3/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #29866 from nextcloud/isset-sizeVincent Petry2022-01-171-1/+1
|\ | | | | Check if size value is set
| * Typoacsfer2021-11-241-1/+1
| |
| * Check if size value is setacsfer2021-11-231-1/+1
| | | | | | | | Using `isset()` as it does not return true for array keys that correspond to a `null` value, while `array_key_exists()` does. Fix #29865
* | Check style updateCarl Schwan2022-01-131-1/+1
| | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Fix a few psalm issues and moved back to psalm/phar 4.18Carl Schwan2022-01-121-1/+1
|/ | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix psalmJohn Molakvoæ2021-11-041-2/+2
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Revert "add dav plugin to trigger recalculating of checksums"John Molakvoæ2021-11-011-3/+2
|
* Add dav plugin to trigger recalculating of checksumsRobin Appelman2021-08-231-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #26494 from rigrig/fix-php8-deprecationsMorris Jobke2021-06-071-2/+6
|\ | | | | Fix some php 8 warnings
| * Check whether output buffering is active before turning it offRichard de Boer2021-05-291-2/+6
| | | | | | | | | | | | | | Before we just turned it off and @suppressed the error if ob was not active. In PHP 8 this error is no longer suppressed, so try to not cause it at all. Signed-off-by: Richard de Boer <git@tubul.net>
* | Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
|/ | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Drop \OCP\UserChristoph Wurst2021-05-211-1/+1
| | | | | | Inlines and remaining usages and drops the deprecated public API. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* reuse usermanager instance when processing search resultsRobin Appelman2021-03-101-2/+3
| | | | | | saves some time when processing large search results Signed-off-by: Robin Appelman <robin@icewind.nl>
* Properly end iterating over the file once the target has been reachedJulius Härtl2021-02-261-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unlock when promoting to exclusive lock failsAshod Nakashian2020-11-071-1/+7
| | | | | | | | | | | | | | | | In certain cases changeLock to EXCLUSIVE fails and throws LockedException. This leaves the file locked as SHARED in file_put_contents, which prevents retrying (because on second call file_put_contents takes another SHARED lock on the same file, and changeLock doesn't allow more than a single SHARED lock to promote to EXCLUSIVE). To avoid this case, we catch the LockedException and unlock before re-throwing. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
* optimize View::getPath if we already know the storage idRobin Appelman2020-09-161-11/+18
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update View.phpScott Dutton2020-04-151-2/+2
|
* Increase max readScott Dutton2020-04-121-2/+2
| | | | | | 8kb is very low, especially given this will be local files Signed-off-by: Scott Dutton <scott@exussum.co.uk>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-5/+2
| | | | | | | | | | | | | | | 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>
* Use elseif instead of else ifChristoph Wurst2020-04-101-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove spaces after method or function callChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-2/+2
| | | | 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-44/+44
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Actually check if the owner is not nullRoeland Jago Douma2020-03-161-0/+5
| | | | | | | Else this can error out on storages that do not have an owner (e.g. groupfolders). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* pass the existing locks info when making locked exception with absolute pathsRobin Appelman2020-03-021-4/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Don't create invalid usersJoas Schilling2020-02-121-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headersChristoph Wurst2019-12-051-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Properly anotate LockedException in files node apiJulius Härtl2019-11-281-9/+15
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+0
| | | | | | | | | | | * 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>
* Merge pull request #15832 from ↵Roeland Jago Douma2019-06-251-2/+2
|\ | | | | | | | | nextcloud/bugfix/noid/fulltext-search-groupfolders Fix full text search for groupfolders
| * Fix full text search for groupfoldersMorris Jobke2019-06-171-2/+2
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | handle storage exceptions when trying to set mtimeRobin Appelman2019-06-061-1/+6
|/ | | | | | | not all storage backends can handle setting the mtime and they might not always handle that error correctly. Signed-off-by: Robin Appelman <robin@icewind.nl>
* search files by id in shared storages lastRobin Appelman2019-05-281-0/+8
| | | | | | this prevents unneeded recursion when the file is not in the share Signed-off-by: Robin Appelman <robin@icewind.nl>
* always allow moving mountpoints inside the same mountpointRobin Appelman2019-03-191-11/+6
| | | | | | even if that mountpoint isn't normally a valid target for moving mounts into Signed-off-by: Robin Appelman <robin@icewind.nl>
* Remove spaming debug logsJoas Schilling2019-03-151-1/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Properly handle null as ownerId if file system access is denied by access tokenJulius Härtl2019-03-011-2/+6
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add dispatcher events to User and Group objectsJoas Schilling2019-03-011-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* cleanup shared lock if changing to exclusive lock failedRobin Appelman2019-01-221-1/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Emit write update only once on touchRoeland Jago Douma2018-12-051-1/+1
| | | | | | | | When a touch is done (i.e. when creating a new file in the node API) The hooks contain 'write' and 'touch' (and the operation is touch as well). This would cause a double write update. Which doesn't make sense. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* tokens can't be valid local user namesRobin Appelman2018-08-161-11/+9
| | | | | | this saves searching for shares on non-public link dav requests Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add resource type phpDoc for putContent methodsJulius Härtl2018-06-261-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Debug log file not found when getting fileinfoRobin Appelman2018-05-041-0/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #9387 from nextcloud/getcachentry-lockMorris Jobke2018-05-041-3/+1
|\ | | | | remove unneeded locks in getCacheEntry