Skip to content

Commit

Permalink
Have to use parent classes to get current action/params for localeLin…
Browse files Browse the repository at this point in the history
…kGenerator because $this ones are overwritten

This was working before in #196 but I broke it in a12a6cb by adding getLocaleLinkAction() and getLocaleLinkParams()
  • Loading branch information
spaze committed Aug 14, 2023
1 parent 1c87bc0 commit 699a906
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion site/app/Www/Presenters/TalksPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public function actionTalk(string $name, ?string $slide = null): void
try {
$talk = $this->talks->get($name);
if ($talk->getLocale() !== $this->translator->getDefaultLocale()) {
$this->redirectUrl($this->localeLinkGenerator->links(...$this->getLocaleLinksGeneratorParams())[$talk->getLocale()]->getUrl(), IResponse::S301_MovedPermanently);
$links = $this->localeLinkGenerator->links(parent::getLocaleLinkAction(), parent::getLocaleLinkParams());
$this->redirectUrl($links[$talk->getLocale()]->getUrl(), IResponse::S301_MovedPermanently);
}
if ($talk->getSlidesTalkId()) {
$slidesTalk = $this->talks->getById($talk->getSlidesTalkId());
Expand Down

0 comments on commit 699a906

Please sign in to comment.