File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1092,7 +1092,7 @@ public function storeRequest($expiration = '+ 10 minutes')
10921092 $ key = Nette \Utils \Random::generate (5 );
10931093 } while (isset ($ session [$ key ]));
10941094
1095- $ session [$ key ] = [$ this ->getUser ()->getId (), $ this ->request ];
1095+ $ session [$ key ] = [$ this ->getUser ()->getId (), $ this ->request , $ this -> httpRequest -> getUrl () ];
10961096 $ session ->setExpiration ($ expiration , $ key );
10971097 return $ key ;
10981098 }
@@ -1110,7 +1110,11 @@ public function restoreRequest($key)
11101110 return ;
11111111 }
11121112 $ request = clone $ session [$ key ][1 ];
1113+ $ url = $ session [$ key ][2 ];
11131114 unset($ session [$ key ]);
1115+ if ($ this ->isAjax ()) {
1116+ $ this ->redirectUrl ($ url );
1117+ }
11141118 $ request ->setFlag (Application \Request::RESTORED , TRUE );
11151119 $ params = $ request ->getParameters ();
11161120 $ params [self ::FLASH_KEY ] = $ this ->getParameter (self ::FLASH_KEY );
You can’t perform that action at this time.
0 commit comments