[CORE][Controller][FeedController] Use controller instance for filtering, making FeedControler->postProcess function non-static

This commit is contained in:
Hugo Sales 2021-12-30 18:26:32 +00:00
parent 5f4968ac05
commit 0ae24f6088
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 2 additions and 2 deletions

View File

@ -132,14 +132,14 @@ abstract class Controller extends AbstractController implements EventSubscriberI
Event::handle('OverrideTemplate', [$this->vars, &$template]); // Allow plugins to replace the template used for anything
unset($this->vars['_template'], $response['_template']);
$controller = $request->get('_controller');
$controller = $this->vars['controller'];
if (\is_array($controller)) {
$controller = $controller[0];
}
// XXX: Could we do this differently?
if (is_subclass_of($controller, FeedController::class)) {
$this->vars = FeedController::postProcess($this->vars);
$this->vars = $controller->postProcess($this->vars);
}
// Respond in the most preferred acceptable content type