Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trashbin:restore occ command #28935

Merged
merged 2 commits into from
Apr 6, 2022
Merged

Conversation

cahogan
Copy link
Contributor

@cahogan cahogan commented Sep 23, 2021

Adds feature requested in #18921 and #20781 to allow trashed file restoration with occ.

Close #18921
Close #20781

@cahogan cahogan marked this pull request as draft September 23, 2021 01:41
@cahogan cahogan marked this pull request as ready for review September 28, 2021 21:35
@szaimen
Copy link
Contributor

szaimen commented Sep 28, 2021

Hey, thank you very much for creating this PR and sry for the late answer!

@szaimen szaimen requested review from icewind1991, a team, PVince81 and ArtificialOwl and removed request for a team September 28, 2021 22:08
@szaimen szaimen added this to the Nextcloud 23 milestone Sep 28, 2021
@skjnldsv skjnldsv mentioned this pull request Oct 13, 2021
@skjnldsv skjnldsv modified the milestones: Nextcloud 23, Nextcloud 24 Oct 21, 2021
@icewind1991
Copy link
Member

rebased, fixed code style issues and changed output to be a bit more concise

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81 PVince81 added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Nov 30, 2021
@cahogan
Copy link
Contributor Author

cahogan commented Dec 7, 2021

I think this will also potentially:
Close #30074

@szaimen
Copy link
Contributor

szaimen commented Jan 2, 2022

Looks like this is ready to go?

@Grunthos
Copy link

Grunthos commented Jan 2, 2022

Looking forward to this going live, but would be nice if it had the option if restoring a specific file based on path or id.

@cahogan
Copy link
Contributor Author

cahogan commented Jan 25, 2022

@Grunthos I think it would be fairly easy to add that in an inelegant way -- restoreDeletedFiles already handles the individual files it restores by $filename, so you could accept an optional input list of filenames to restore, then check for membership. I am sure there is a faster and better way to accomplish this, though.

@szaimen as far as I am concerned yes :)

@Grunthos
Copy link

Grunthos commented Jan 25, 2022

@cahogan I was just thinking of something based on internal object IDs from the database; in many cases where accidental deletions have occurred they are pretty easy to find. If a path was specifiable, then a wildcard recursive path would be nice ;-).

@skjnldsv skjnldsv mentioned this pull request Mar 24, 2022
@PVince81
Copy link
Member

/rebase

@PVince81
Copy link
Member

seems our bot likely cannot rebase on forks

I've retriggered CI to get an up to date result

@szaimen
Copy link
Contributor

szaimen commented Mar 30, 2022

I rebased manually. Lets see what CI says

@blizzz blizzz mentioned this pull request Mar 31, 2022
@szaimen
Copy link
Contributor

szaimen commented Apr 5, 2022

I think the failures are unrelated.
cc @PVince81 if we can merge this

@PVince81 PVince81 merged commit b88dc5f into nextcloud:master Apr 6, 2022
@welcome
Copy link

welcome bot commented Apr 6, 2022

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

@blizzz blizzz mentioned this pull request Apr 7, 2022
@PVince81
Copy link
Member

PVince81 commented Jul 1, 2022

@cahogan ping, can you add the docs as per my previous comment ?
let me know if you can't so someone else can take care.
thanks!

@szaimen szaimen added the pending documentation This pull request needs an associated documentation update label Jul 1, 2022
@allinappliadmin
Copy link

@PVince81
Copy link
Member

PVince81 commented Jan 4, 2023

@cahogan
Copy link
Contributor Author

cahogan commented Jan 19, 2023

Hi all, my apologies -- I didn't receive notifications from this thread. Thank you very much for adding documentation -- is there any additional info that I could help with at this point, or is the PR complete?

@PVince81
Copy link
Member

@cahogan it is complete now. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement feature: occ feature: trashbin pending documentation This pull request needs an associated documentation update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add occ command to restore files from trashbin [Feature Request] php occ trashbin:restore
7 participants