-
Notifications
You must be signed in to change notification settings - Fork 28
Add page trash backend #700
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
be769f4
Add collectives trash backend provider to files_trashbin
mejo- cecd019
Trash pages instead of deleting them when files_trashbin is enabled
mejo- e8978f4
Allow to restore/delete pages from trash via Collectives API
mejo- 46874d2
Refactor: move node-related functions from PageService to NodeHelper
mejo- 88042dd
Add behat tests for page trash
mejo- a19e0f7
Remove versions along with pages
mejo- d8bb2f7
Delete trash and versions when deleting a collective
mejo- 8b6ac69
Add behat tests for collectives trash over webdav API
mejo- cb18b01
Revert subfolders of parent page when deleting from trash
mejo- 6300d97
Don't grant access to trash of read-only collectives
mejo- bcac981
Restore attachments folder along with page if it exists
mejo- c089e16
Restore+remove attachments folder from trash along with page
mejo- e310a12
Add behat tests for page trash API in public shares
mejo- ea037d5
Add fixes detected by psalm
mejo- f935a7c
Call notifyPush when trashing a page also without files_trashbin
mejo- b894a77
Delete collective leftovers even if collective folder is already gone
mejo- 235b4aa
Improve exception message when trashed page not found in database
mejo- 93c8d63
Also return full PageInfo objects for page trash index
mejo- 14967ef
Fix handling of deleted pages with subpages
mejo- d3a46c4
PageTrashCleanup: Different return values for different failure reasons
mejo- 710a616
Code style fixes by php-cs-fixer
mejo- 34b080a
Make sure long filenames are truncated in trashbin
mejo- File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Trash pages instead of deleting them when files_trashbin is enabled
Add `trashed_timestamp` property to pages table in database to flag pages as trashed. Signed-off-by: Jonas <[email protected]>
- Loading branch information
commit cecd0196b8fcfa67568d9299ca00490c718b71f9
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace OCA\Collectives\Migration; | ||
|
|
||
| use Closure; | ||
| use Doctrine\DBAL\Types\Types; | ||
| use OCP\DB\ISchemaWrapper; | ||
| use OCP\Migration\IOutput; | ||
| use OCP\Migration\SimpleMigrationStep; | ||
|
|
||
| class Version020600Date20230519000000 extends SimpleMigrationStep { | ||
| /** | ||
| * @param IOutput $output | ||
| * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` | ||
| * @param array $options | ||
| * | ||
| * @return null|ISchemaWrapper | ||
| */ | ||
| public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { | ||
| /** @var ISchemaWrapper $schema */ | ||
| $schema = $schemaClosure(); | ||
|
|
||
| $table = $schema->getTable('collectives_pages'); | ||
| if (!$table->hasColumn('trash_timestamp')) { | ||
| $table->addColumn('trash_timestamp', Types::INTEGER, [ | ||
| 'notnull' => false, | ||
| ]); | ||
| return $schema; | ||
| } | ||
|
|
||
| return null; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.