summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-12 11:51:27 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-12 11:51:27 +0200
commit806ca600d3669343ee7ae90a9b5d65be9dfdbefe (patch)
treeb6db537a8d79c70610014b69beaa5924c2ca2c31 /index.php
parentf696c1fe8df29d54a933804a6f4d182a5a59c7a2 (diff)
Some more index.php improvements
Diffstat (limited to 'index.php')
-rw-r--r--index.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/index.php b/index.php
index 680dccfea..380d1017b 100644
--- a/index.php
+++ b/index.php
@@ -174,9 +174,9 @@ if (defined('ENVIRONMENT'))
chdir(dirname(__FILE__));
}
- if (realpath($system_path) !== FALSE)
+ if (($_temp = realpath($system_path)) !== FALSE)
{
- $system_path = realpath($system_path).'/';
+ $system_path = $_temp.'/';
}
else
{
@@ -187,6 +187,7 @@ if (defined('ENVIRONMENT'))
// Is the system path correct?
if ( ! is_dir($system_path))
{
+ header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
exit('Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME));
}
@@ -210,9 +211,9 @@ if (defined('ENVIRONMENT'))
// The path to the "application" folder
if (is_dir($application_folder))
{
- if (realpath($system_path) !== FALSE)
+ if (($_temp = realpath($system_path)) !== FALSE)
{
- $application_folder = realpath($application_folder);
+ $application_folder = $_temp;
}
define('APPPATH', $application_folder.'/');
@@ -221,7 +222,7 @@ if (defined('ENVIRONMENT'))
{
if ( ! is_dir(BASEPATH.$application_folder.'/'))
{
- header('HTTP/1.1 503 Service Unavailable.', TRUE, '503');
+ header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
exit('Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF);
}
@@ -237,7 +238,7 @@ if (defined('ENVIRONMENT'))
}
elseif ( ! is_dir(APPPATH.'views/'))
{
- header('HTTP/1.1 503 Service Unavailable.', TRUE, '503');
+ header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
exit('Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF);
}
else
@@ -246,7 +247,7 @@ if (defined('ENVIRONMENT'))
}
}
- if (realpath($view_folder) !== FALSE)
+ if (($_temp = realpath($view_folder)) !== FALSE)
{
$view_folder = realpath($view_folder).'/';
}