Commit Graph

50 Commits (660f3f6fd1ae5539b8f74bfa48859d1b9f1e6abf)

Author SHA1 Message Date
Ferdinand Thiessen 660f3f6fd1
refactor: use logical `&&` `||` instead of weak `and` `or` operators
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-27 23:02:18 +07:00
Kent Delante 1ccf491a9e fix(files_trashbin): Expire trashbin items when space is needed
Signed-off-by: Kent Delante <kent.delante@proton.me>
2025-07-05 14:12:30 +07:00
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
provokateurin 78a175fc74
refactor: Apply rector refactorings
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-14 15:29:02 +07:00
Ferdinand Thiessen 1ae3fa4003
chore: replace leagcy OC_Helper calls with OCP\Util
- Replace legacy calls with OCP\Util
- Add missing deprecation notices
- Inline implementation in OCP\Util and call it from OC_Helper

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-14 10:18:04 +07:00
Louis Chemineau 0a585b0048
fix: Catch exceptions when expiring trashbin
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-04-02 17:04:06 +07:00
Louis Chemineau 9677cb86cb
chore: Use iterator in ExpireTrash command
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-04-02 12:44:54 +07:00
Côme Chilliet 64863c9d46
chore: Apply new rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 11:46:42 +07:00
provokateurin 381077028a
refactor(apps): Use constructor property promotion when possible
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-21 12:37:59 +07:00
Git'Fellow a1681b0756 chore(db): Apply query prepared statements
Fix: psalm

fix: bad file

fix: bug

chore: add batch

chore: add batch

chore: add batch

fix: psalm
2024-10-17 20:30:47 +07:00
Côme Chilliet 1580c8612b
chore(apps): Apply new rector configuration to autouse classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-15 10:40:25 +07:00
Côme Chilliet 1a4978c4ea
chore: Apply rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-20 17:51:00 +07:00
provokateurin 9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
Anna Larch 8af7ecb257 chore: adjust code to adhere to coding standard
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-09-05 21:23:38 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Joas Schilling bfd96b070b
fix(trashbin): Improve documentation of since/until timestamps of restore trashbin
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-30 20:33:56 +07:00
Andy Scherzinger afa48a4e0e
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-06-02 20:00:00 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Robin Windey d7a73ffdf1 Rename since/until in verbose message
Signed-off-by: GitHub <noreply@github.com>
2023-08-18 07:25:39 +07:00
Robin Windey acf0b4ce34 Code adjustments according to PR review
* Delete unnecessary function docs
* Rename parameters to 'since' and 'until'
* Style: use '&&' instead of 'and'
* Add types

Signed-off-by: GitHub <noreply@github.com>
2023-08-18 07:25:39 +07:00
Robin Windey 52d77eb9fe Make scope parsing more readable
Signed-off-by: GitHub <noreply@github.com>
2023-08-18 07:25:39 +07:00
Robin Windey ee66518ca2 Decouple from groupfolders app & remove PSALM warnings
Signed-off-by: GitHub <noreply@github.com>
2023-08-18 07:25:39 +07:00
Robin Windey 98dd02b467 Let occ trashbin:restore restore also from groupfolders and add additional filters
* Using the TrashManager allows access to all deleted files
* Add 'scope' parameter to choose where to restore from (user or groupfolders)
* Add 'restore-from' and 'restore-to' date parameters to filter files to be
  restored by their deletion date
* Add 'dry-run' flag to be able to see which files would be restored and being
  able to adjust the filter parameters accordingly

Signed-off-by: GitHub <noreply@github.com>
2023-08-18 07:25:39 +07:00
Christopher Ng 7c430a8afc fix(trashbin): Truncate long filenames
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2023-05-31 19:06:42 +07:00
Robin Appelman 9a731ad617
add a bit more verbose option for trashbin cleanup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-03 18:59:02 +07:00
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>
2022-07-04 17:13:15 +07:00
Robin Appelman 90cfa31533 more concise output, code style fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-30 15:44:02 +07:00
cahogan dfe045699b Add trashbin:restore occ command
Signed-off-by: cahogan <caitlin.hogan@swiftsolar.com>
2022-03-30 15:44:02 +07:00
szaimen 98102bfa78 Improve auto expiration hint
Signed-off-by: szaimen <szaimen@e.mail.de>
Co-Authored-By: Pytal <24800714+Pytal@users.noreply.github.com>
2021-08-08 20:41:38 +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
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +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
Robin Appelman 050e2fe346
allow admin to configure the max trashbin size
this allows an admin to configure the max trashbin size instead of always relying on the users quota.

The trashbin size can be configured using the `occ trash:size` command and can be set both globally and per-user

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-07 14:45:08 +07:00
Joas Schilling d7c0b9cced
Also always return in app commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 15:12:11 +07:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07:00
Christoph Wurst 1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +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 afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +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 68748d4f85
Some php-cs fixes
* 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>
2019-11-22 20:52:10 +07:00
Liam Dennehy 68e41a3aae trashbin:cleanup exceptions for invalid options
* throw on no parameters provided
* throw on --all-users and userid provided

Signed-off-by: Liam Dennehy <liam@wiemax.net>
2018-06-28 22:31:27 +07:00
Liam Dennehy 6bc3d3781d Default behaviour when no users are specified on trashbin:cleanup
* Add option --all-users to explicitly clean all trashbins
* Reject no users on commandline and no --all-users
* Warn when --all-users and userids are specified

Signed-off-by: Liam Dennehy <liam@wiemax.net>
2018-06-28 17:14:45 +07:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Jörn Friedrich Dreyer f8352fcb8d
introduce callForSeenUsers and countSeenUsers (#26361)
* introduce callForSeenUsers and countSeenUsers

* add tests

* oracle should support not null on clob

* since 9.2.0
2016-10-28 08:44:05 +07:00
Thomas Müller 297d2e48ad
Add occ command to expire the trashbin (#25878)
* Add occ command to expire the trashbin

* Fix versions folder in setup check
2016-08-29 14:30:40 +07:00
Joas Schilling 0215b004da
Update with robin 2016-07-21 18:13:58 +07:00
Joas Schilling 813f0a0f40
Fix apps/ 2016-07-21 18:13:57 +07:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +07:00
Joas Schilling d5dee80580 Move files_trashbin to PSR-4 (#24570) 2016-05-12 09:48:53 +07:00