summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gummi <martin.gummi@cacert.org>2015-01-14 00:32:08 +0100
committerMartin Gummi <martin.gummi@cacert.org>2015-01-14 00:32:08 +0100
commit8742c0193ab9ff0b56ec1d90d0a24a595534d982 (patch)
treee57db9474c00977719a38623842b84d22f2a4074
parent5a7f42429c4b029a2349c8b666dcc7ea50aad099 (diff)
downloadcacert-devel-8742c0193ab9ff0b56ec1d90d0a24a595534d982.tar.gz
cacert-devel-8742c0193ab9ff0b56ec1d90d0a24a595534d982.tar.xz
cacert-devel-8742c0193ab9ff0b56ec1d90d0a24a595534d982.zip
bug-1355 enforced blocks for single statments
-rw-r--r--includes/general.php24
1 files changed, 15 insertions, 9 deletions
diff --git a/includes/general.php b/includes/general.php
index ba03996..f7481a5 100644
--- a/includes/general.php
+++ b/includes/general.php
@@ -64,9 +64,11 @@
}
else
{
- if($_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname'])
- header("location: https://". $_SESSION['_config']['securehostname']);
+ if($_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname']){
+ header("location: https://". $_SESSION['_config']['securehostname']);
+ }
exit;
+
}
}
@@ -95,11 +97,13 @@
$section = "index";
}
- if($section == "account")
+ if($section == "account"){
include_once($_SESSION['_config']['filepath']."/includes/account_stuff.php");
+ }
- if($section == "index")
+ if($section == "index"){
include_once($_SESSION['_config']['filepath']."/includes/general_stuff.php");
+ }
}
function includeit($id = "0", $section = "index")
@@ -110,22 +114,24 @@
$section = "index";
}
- if(file_exists($_SESSION['_config']['filepath']."/pages/$section/$id.php"))
+ if(file_exists($_SESSION['_config']['filepath']."/pages/$section/$id.php")){
include_once($_SESSION['_config']['filepath']."/pages/$section/$id.php");
+ }
else {
$id = "0";
- if(file_exists($_SESSION['_config']['filepath']."/pages/$section/$id.php"))
+ if(file_exists($_SESSION['_config']['filepath']."/pages/$section/$id.php")){
include_once($_SESSION['_config']['filepath']."/pages/$section/$id.php");
- else {
+ } else {
$section = "index";
$id = "0";
- if(file_exists($_SESSION['_config']['filepath']."/pages/$section/$id.php"))
+ if(file_exists($_SESSION['_config']['filepath']."/pages/$section/$id.php")){
include_once($_SESSION['_config']['filepath']."/pages/$section/$id.php");
- else
+ } else {
include_once($_SESSION['_config']['filepath']."/www/error404.php");
+ }
}
}
}