turn into a url instead of boolean. Use it to refresh the options page on change so that changes are instantly noticable

This commit is contained in:
Isaac Connor
2018-01-28 15:13:57 -05:00
parent bc6d8623a6
commit 8a4b17fb50
3 changed files with 5 additions and 4 deletions

View File

@@ -126,7 +126,7 @@ if ( $action == 'login' && isset($_REQUEST['username']) && ( ZM_AUTH_TYPE == 're
userLogin( $username, $password );
$refreshParent = true;
$view = 'console';
$redirect = true;
$redirect = ZM_BASE_URL.$_SERVER['PHP_SELF'].'?view=console';
} else if ( $action == 'logout' ) {
userLogout();
$refreshParent = true;
@@ -726,7 +726,7 @@ if ( canEdit( 'System' ) ) {
$_SESSION['zmMontageLayout'] = $Layout->Id();
setcookie('zmMontageLayout', $Layout->Id(), 1 );
session_write_close();
$redirect = true;
$redirect = ZM_BASE_URL.$_SERVER['PHP_SELF'].'?view=montagereview';
} // end if save
} else if ( $_REQUEST['object'] == 'server' ) {
@@ -893,6 +893,7 @@ if ( canEdit( 'System' ) ) {
case 'lowband' :
break;
}
$redirect = ZM_BASE_URL.$_SERVER['PHP_SELF'].'?view=options&tab='.$_REQUEST['tab'];
}
loadConfig( false );
} elseif ( $action == 'user' ) {

View File

@@ -214,7 +214,7 @@ if ( ZM_OPT_USE_AUTH and ! isset($user) ) {
session_write_close();
if ( $redirect ) {
header('Location: '.ZM_BASE_URL.$_SERVER['PHP_SELF'].'?view='.$view);
header('Location: '.$redirect;
return;
}

View File

@@ -23,7 +23,7 @@ xhtmlHeaders(__FILE__, translate('LoggingIn') );
<body>
<div id="page">
<div id="header">
<h1>ZoneMinder <?php echo translate('Login') ?></h1>
<h1><?php echo ZM_WEB_TITLE . ' ' . translate('Login') ?></h1>
</div>
<div id="content">
<h2><?php echo translate('LoggingIn') ?></h2>