Commit 245e12cc authored by Ben Hayward's avatar Ben Hayward

Removed old handler

1 merge request!359WIP: [Sprint/PinkPanther](fix): Stripping out blog body upon export.
Pipeline #88029314 running with stages
......@@ -64,33 +64,6 @@ class Events
}
});
/**
* Blogs need more exportable fields for paywall
*/
Dispatcher::register('export:extender', 'blog', function (Event $event) {
$params = $event->getParameters();
/** @var Core\Blogs\Blog $blog */
$blog = $params['entity'];
$export = $event->response() ?: [];
$currentUser = Session::getLoggedInUserGuid();
$dirty = false;
if ($blog->isPaywall() && $blog->owner_guid != $currentUser) {
$export['description'] = '';
$export['body'] = '';
$dirty = true;
}
if ($dirty) {
return $event->setResponse($export);
}
if (!$currentUser) {
return;
}
});
/**
* Wire paywall hooks. Allows access if sent wire or is plus
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment