clean up and reduce depth of some logic
This commit is contained in:
parent
124be4eee6
commit
58d3583722
|
@ -51,7 +51,6 @@ require_once('includes/Event.php');
|
||||||
require_once('includes/Group.php');
|
require_once('includes/Group.php');
|
||||||
require_once('includes/Monitor.php');
|
require_once('includes/Monitor.php');
|
||||||
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')
|
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')
|
||||||
or
|
or
|
||||||
|
@ -166,6 +165,7 @@ if ( !is_writable(ZM_DIR_EVENTS) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Globals
|
# Globals
|
||||||
|
$action = null;
|
||||||
$error_message = null;
|
$error_message = null;
|
||||||
$redirect = null;
|
$redirect = null;
|
||||||
$view = null;
|
$view = null;
|
||||||
|
@ -185,9 +185,9 @@ foreach ( getSkinIncludes('skin.php') as $includeFile )
|
||||||
# User Login will be performed in auth.php
|
# User Login will be performed in auth.php
|
||||||
require_once('includes/auth.php');
|
require_once('includes/auth.php');
|
||||||
|
|
||||||
if ( isset($_REQUEST['action']) ) {
|
if ( isset($_REQUEST['action']) )
|
||||||
$action = detaintPath($_REQUEST['action']);
|
$action = detaintPath($_REQUEST['action']);
|
||||||
}
|
|
||||||
|
|
||||||
# The only variable we really need to set is action. The others are informal.
|
# The only variable we really need to set is action. The others are informal.
|
||||||
isset($view) || $view = NULL;
|
isset($view) || $view = NULL;
|
||||||
|
@ -244,7 +244,8 @@ if ( $request ) {
|
||||||
require_once $includeFile;
|
require_once $includeFile;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
if ( $includeFiles = getSkinIncludes('views/'.$view.'.php', true, true) ) {
|
if ( $includeFiles = getSkinIncludes('views/'.$view.'.php', true, true) ) {
|
||||||
foreach ( $includeFiles as $includeFile ) {
|
foreach ( $includeFiles as $includeFile ) {
|
||||||
if ( !file_exists($includeFile) )
|
if ( !file_exists($includeFile) )
|
||||||
|
@ -266,5 +267,4 @@ if ( $request ) {
|
||||||
foreach ( getSkinIncludes('views/error.php', true, true) as $includeFile )
|
foreach ( getSkinIncludes('views/error.php', true, true) as $includeFile )
|
||||||
require_once $includeFile;
|
require_once $includeFile;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue