Skip to content

Commit

Permalink
chore: support latest GDPR beta (#91)
Browse files Browse the repository at this point in the history
* chore: support latest gdpr beta

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
imorland and StyleCIBot authored Oct 23, 2023
1 parent 2c0a2e6 commit 2491b20
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
],
"require": {
"flarum/core": "^1.8.0"
"flarum/core": "^1.8.3"
},
"authors": [
{
Expand Down
8 changes: 4 additions & 4 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
->registerPreference('draftAutosaveInterval', 'intVal', 6),

(new Extend\Conditional())
->whenExtensionEnabled('blomstra-gdpr', [
class_exists(UserData::class) ? (new UserData())
->addType(Data\Drafts::class) : null,
]),
->whenExtensionEnabled('blomstra-gdpr', fn () => [
(new UserData())
->addType(Data\Drafts::class),
]),
];
5 changes: 1 addition & 4 deletions src/Data/Drafts.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ public function export(ZipFile $zip): void
->each(function (Draft $draft) use ($zip) {
$zip->addFromString(
"drafts/draft-{$draft->id}.json",
json_encode(
$this->sanitize($draft),
JSON_PRETTY_PRINT
)
$this->encodeForExport($this->sanitize($draft))
);
});
}
Expand Down

0 comments on commit 2491b20

Please sign in to comment.