Skip to content

Commit

Permalink
Presenter: saveGlobalState() moved from createRequest() to redirect()
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 20, 2024
1 parent 654e0e1 commit bb652c1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions src/Application/UI/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ public function redirect(string $destination, $args = []): void
? $args
: array_slice(func_get_args(), 1);
$presenter = $this->getPresenter();
$presenter->saveGlobalState();
$presenter->redirectUrl($presenter->createRequest($this, $destination, $args, 'redirect'));
}

Expand Down
4 changes: 0 additions & 4 deletions src/Application/UI/Presenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -941,10 +941,6 @@ protected function createRequest(
$this->saveStatePartial($args, $reflection);
}

if ($mode === 'redirect') {
$this->saveGlobalState();
}

$globalState = $this->getGlobalState($path === 'this' ? null : $presenterClass);
if ($current && $args) {
$tmp = $globalState + $this->params;
Expand Down

0 comments on commit bb652c1

Please sign in to comment.