Don't run actions if we intend to redirect

pull/3825/merge
Isaac Connor 2024-11-22 16:29:35 -05:00
parent 9c097919f6
commit 1884b18611
1 changed files with 3 additions and 0 deletions

View File

@ -212,6 +212,9 @@ if ( ZM_OPT_USE_AUTH and (!isset($user)) and ($view != 'login') and ($view != 'n
zm_session_start(); zm_session_start();
$_SESSION['postLoginQuery'] = $_SERVER['QUERY_STRING']; $_SESSION['postLoginQuery'] = $_SERVER['QUERY_STRING'];
session_write_close(); session_write_close();
ZM\Debug("Redirecting to $redirect");
header('Location: '.$redirect);
return;
} else if ( ZM_SHOW_PRIVACY && ($view != 'privacy') && ($view != 'options') && (!$request) && canEdit('System') ) { } else if ( ZM_SHOW_PRIVACY && ($view != 'privacy') && ($view != 'options') && (!$request) && canEdit('System') ) {
$view = 'none'; $view = 'none';
$redirect = '?view=privacy'; $redirect = '?view=privacy';