Robin Appelman
9f1d497a0b
Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_private
...
Refactors "strpos" calls in lib/private to improve code readability.
2023-06-01 23:10:00 +07:00
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +07:00
Côme Chilliet
ae525e1935
Fix return types in phpdoc
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-15 12:24:42 +07:00
Robin Appelman
5267a74027
fix type hints
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-04 17:05:45 +07:00
Robin Appelman
f76b4473ee
escape path prefix when doing cache jail search
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-11-02 12:44:51 +07:00
Carl Schwan
54031e370a
Fix various other small psalm issues
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 12:40:35 +07:00
Robin Appelman
b6f8b8da60
directly build the search filter for shared storage instead of setting up the source cache
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-17 11:58:57 +07:00
Robin Appelman
9d6c2ce301
optimize search post-processing for jail wrapper
...
don't both asking the wrapped cache if we know it's not in our jail anyway
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 13:36:52 +07:00
Côme Chilliet
7ae6791737
Document all getIncomplete implementations as returning string|false
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-02 14:23:14 +07:00
Robin Appelman
118c647f61
properly handle cases where cache wrappers block access
...
`CacheWrapper::formatCacheEntry` can return false for files that should be filtered out
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-11-01 11:48:01 +07:00
Vincent Petry
e32d293346
Merge pull request #28476 from nextcloud/search-jail-insensitive
...
use case insensitive like when limiting search to jail
2021-08-24 08:59:35 +07:00
Robin Appelman
c688703117
use getGetUnjailedRoot to determine if jailed search needs the path filter
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-08-23 16:27:53 +07:00
Robin Appelman
c48f9ffcdd
use case insensitive like when limiting search to jail
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-08-17 13:51:45 +07:00
Robin Appelman
97aadbe46c
dont apply jail search filter is on the root
...
the extra '/' breaks things and the filter wouldn't do anything anyway except making the databases job harder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-07-26 17:44:52 +07:00
Robin Appelman
9774fb1573
use searchoperation for storage filter instead of db expression
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-14 16:11:25 +07:00
Robin Appelman
e198dc1b20
rework search api to allow searching on multiple caches at once
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-14 16:11:22 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Robin Appelman
7ee528fc5a
properly use limit and offset for search in Jail wrapper
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-05-21 15:37:38 +07:00
Robin Appelman
e511a539b7
adjust tests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-26 15:55:38 +07:00
Robin Appelman
5ae0be08b4
fix search in nested jails
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-26 15:30:54 +07:00
Robin Appelman
27f9df2e87
fix cachjail searching for root
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-26 15:30:50 +07:00
Robin Appelman
a44aab11f7
do cachejail search filtering in sql
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-26 15:30:46 +07:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +07:00
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>
2020-08-19 18:16:35 +07:00
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>
2020-04-10 14:19:56 +07:00
Christoph Wurst
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +07:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +07:00
Christoph Wurst
23eb0462e5
Use lowercase true, false and null constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 21:53:04 +07:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Roeland Jago Douma
0487144b26
Remove deprecated searchByTag
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-07-26 12:29:19 +07:00
Ari Selseng
d16cfb519e
Avoid calculating folder size for parent that needs scan.
...
Signed-off-by: Ari Selseng <ari@selseng.net>
2019-03-06 15:23:37 +07:00
Roeland Jago Douma
0277cd7158
Properly search the root of a shared external storage
...
Fixes #1020
When an external storage is shared with you in full the root is ''
(empty). This adds an extra check for an empty jail basically.
Because if the jail is on the empty string. It matches all paths.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-11-05 16:27:43 +07:00
Roeland Jago Douma
c1ff12e234
CacheJail should apply limit and offset after searching
...
Else the results might not be correct.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-02-07 13:41:15 +07:00
Roeland Jago Douma
53a780e31c
Do not try to get the jailed path if we can't find the id
...
Fixes #8047
If we can't find the file by id there we should just return null instead
of trying to get the jailed path of null.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-02-03 14:45:28 +07:00
Robin Appelman
c87d689253
delay calculating the shared cache root until it's used
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-12-04 15:16:39 +07:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Robin Appelman
fa81759917
fix moving folders out of a cache jail
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-06-15 13:59:06 +07:00
Robin Appelman
df2063ee7b
Implement webdav SEARCH
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-01 14:06:39 +07:00
Robin Appelman
2520a4831b
Make sure we use the correct storage id when scanning a jailed storage
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-25 17:03:45 +07:00
Robin Appelman
14cdeafc3e
make source cache injectable in cache wrappers
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-17 18:48:38 +07:00
Robin Appelman
30e7c27d86
reuse the known rootinfo in the shared cache when possible
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-17 14:59:31 +07:00
Thomas Müller
f1cd68d713
Adding test case for getPathById including a jailed cache where root is just empty
2016-08-05 14:06:05 +07:00
Thomas Müller
d252d79059
getJailedPath expects $path to have a trailing / - fixes #25464
2016-08-05 14:06:05 +07:00
Joas Schilling
0215b004da
Update with robin
2016-07-21 18:13:58 +07:00
Joas Schilling
ba87db3fcc
Fix others
2016-07-21 18:13:57 +07:00
Lukas Reschke
aba539703c
Update license headers
2016-05-26 19:57:24 +07:00
Roeland Jago Douma
00122c166a
Properly get the internal path for a cachejail move
2016-04-30 10:40:45 +07:00
Thomas Müller
f31d0ce87c
Merge branch 'master' of https://github.com/d--j/core into d--j-master
2016-04-25 14:52:38 +07:00
Roeland Jago Douma
dedf392751
Move \OC\Files to PSR-4
2016-04-24 21:37:35 +07:00