John Molakvoæ
29a7f7f6ef
feat(files_trashbin): migrate to vue
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
1 year ago
Robin Appelman
9a731ad617
add a bit more verbose option for trashbin cleanup
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Côme Chilliet
110fc79918
Silence errors of return type mismatch from Sabre for now
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet
cd885b5705
Type sizes as int|float throughout the code base
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Julius Härtl
7f913dec03
fix(files_trashbin): Remove unnecessary scanner logic when getting versions from trash
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 year ago
luz paz
9d26671f05
Fix typos in apps/ subdirectory
Found via `codespell -q 3 -S l10n,./apps/files_external/3rdparty -L adn,ba,boxs,keypair,jus,optionel,ressource,tabel ./apps/`
Signed-off-by: luz paz <luzpaz@github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
1 year ago
Carl Schwan
48d9c4d2b0
Port existing server code to new interface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
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
Christopher Ng
667b671c5a
Fix trashbin expiration notice casing
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2 years ago
Carl Csaposs
6f6ccfcc18
Sort files by deletion time before restoring in RestoreAllFiles
Restoring in order of most recently deleted preserves nested file paths.
See https://github.com/nextcloud/server/issues/31200#issuecomment-1130358549
Signed-off-by: Carl Csaposs <carl@csaposs.com>
2 years ago
Christopher Ng
bd1efae616
Add trashbin export expiration notice
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2 years ago
Robin Appelman
9188fad190
use size from cache to determine whether to skip the trashbin
this way large folders also get skipped
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Christopher Ng
432bc9a585
Update method name
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2 years ago
Côme Chilliet
6da413f7af
Move new IMigrator method to a specific interface ISizeEstimationMigrator
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet
09917b8583
Implement getExportEstimatedSize in migrators
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Carl Schwan
53169890d6
Fix psalm errors fron the end of the baseline file
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Vincent Petry
78c8e57896
Fix migrators according to exceptions
Fixed syntax errors.
Removed if condition for copyToFolder since it's void now.
Change signature of setMigratorVersions to also be void.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2 years ago
Côme Chilliet
0fd72f4355
Adapt existing migrators to new API
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet
dda51d49d7
Use Migrators id instead of class names
This will help with UI and means migrators can move in namespaces
without changing export format.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Christopher Ng
4750f232eb
Extend trashbin migrator
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2 years ago
Robin Appelman
90cfa31533
more concise output, code style fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
cahogan
dfe045699b
Add trashbin:restore occ command
Signed-off-by: cahogan <caitlin.hogan@swiftsolar.com>
2 years ago
Côme Chilliet
7fa8b2eef7
Add a guard to check that trashbin folder is a folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet
ea23523c70
Adapt more code to migration to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet
ecbcfca98a
Improve wording of output for trashbin migrator
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet
53c731d8f9
Rename PATH constants to show if folder or file
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet
865ac4b6e0
Rename $insert var to $qb
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet
51d228932f
Add trashbin migrator to export and import trashbin data
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Orzu Ionut
33c1c5c91b
Show most recently deleted files first in trash can
Signed-off-by: Orzu Ionut <orzu.ionut@gmail.com>
2 years ago
Daniel Kesselberg
b0d1ad5777
Add configuration flag to disable the background job for files_trashbin
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2 years ago
Sven Strickroth
1c736abc35
Don't die with LockedException when removing/restoring multiple files from trash
fixes issue #16491
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2 years ago
szaimen
98102bfa78
Improve auto expiration hint
Signed-off-by: szaimen <szaimen@e.mail.de>
Co-Authored-By: Pytal <24800714+Pytal@users.noreply.github.com>
2 years ago
Robin Appelman
e198dc1b20
rework search api to allow searching on multiple caches at once
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 years ago
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Christoph Wurst
8196420063
Drop \OCP\User
Inlines and remaining usages and drops the deprecated public API.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Julius Härtl
bcf38692ae
Use parent wrapper to properly handle moves on the same source/target storage
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago
Christoph Wurst
99f2fa73d1
Fix usage of rename executeUpdate
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Roeland Jago Douma
8008b33b8d
Cleanp execute usage in the trashbin
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
3 years ago
Julius Härtl
930b40bd8a
Remove trash items from other trash backends when deleting all
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago
dependabot-preview[bot]
eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard ) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases )
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Robin Appelman
b5db4502d0
disable trasbin during the moveFromStorage fallback
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 years ago
Roeland Jago Douma
a0988281ee
Do not obtain userFolder of a federated user
Federated shares are somewhat special. So we can't move the files from
the main user and we should try to get it from the intialized root
already.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
3 years ago
Christoph Wurst
c1d4f8161b
Migrate internal classes to the OCP db col types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst
9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Vincent Petry
bdbec28a8f
Make oc_files_trash.auto_id a bigint
Adjusted migration.
Added to occ command to update existing tables.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
3 years ago
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Julius Härtl
f4b036f249
Only attempt to move to trash if a file is not in appdata
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago
Joas Schilling
8027dcbc6f
Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Joas Schilling
e52925c5fb
Use query builder instead of OC_DB in trashbin
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Julius Härtl
2616a784c9
Restrict query when searching for versions of trashbin files
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago