Change order of redirect and error message

This commit is contained in:
Kijin Sung 2019-10-10 15:08:40 +09:00
parent 0f6c1edc68
commit 9c10fa56bb

View file

@ -943,18 +943,18 @@ class ModuleHandler extends Handler
// Handle iframe form submissions.
if(isset($_POST['_rx_target_iframe']) && starts_with('_rx_temp_', $_POST['_rx_target_iframe']))
{
if($_SESSION['XE_VALIDATOR_RETURN_URL'])
{
ob_end_clean();
echo sprintf('<html><head></head><body><script> window.parent.redirect(%s); </script></body></html>', json_encode($_SESSION['XE_VALIDATOR_RETURN_URL']));
return;
}
if($this->error)
{
ob_end_clean();
echo sprintf('<html><head></head><body><script> window.parent.alert(%s); window.parent.remove_iframe(%s); </script></body></html>', json_encode($this->error), json_encode($_POST['_rx_target_iframe']));
return;
}
elseif($_SESSION['XE_VALIDATOR_RETURN_URL'])
{
ob_end_clean();
echo sprintf('<html><head></head><body><script> window.parent.redirect(%s); </script></body></html>', json_encode($_SESSION['XE_VALIDATOR_RETURN_URL']));
return;
}
}
// Handle redirects.