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')
1092
1092
$ key = Nette \Utils \Random::generate (5 );
1093
1093
} while (isset ($ session [$ key ]));
1094
1094
1095
- $ session [$ key ] = [$ this ->getUser ()->getId (), $ this ->request ];
1095
+ $ session [$ key ] = [$ this ->getUser ()->getId (), $ this ->request , $ this -> httpRequest -> getUrl () ];
1096
1096
$ session ->setExpiration ($ expiration , $ key );
1097
1097
return $ key ;
1098
1098
}
@@ -1110,7 +1110,11 @@ public function restoreRequest($key)
1110
1110
return ;
1111
1111
}
1112
1112
$ request = clone $ session [$ key ][1 ];
1113
+ $ url = $ session [$ key ][2 ];
1113
1114
unset($ session [$ key ]);
1115
+ if ($ this ->isAjax ()) {
1116
+ $ this ->redirectUrl ($ url );
1117
+ }
1114
1118
$ request ->setFlag (Application \Request::RESTORED , TRUE );
1115
1119
$ params = $ request ->getParameters ();
1116
1120
$ params [self ::FLASH_KEY ] = $ this ->getParameter (self ::FLASH_KEY );
You can’t perform that action at this time.
0 commit comments