summaryrefslogtreecommitdiff
path: root/create_config_inc.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2011-01-08 14:03:57 -0500
committerChristian Fowler <spider@viovio.com>2011-01-08 14:03:57 -0500
commitf8e358703ed5fd53b4e3400b7a6adfd2fa133f0f (patch)
treeaaed71d29a95b3f0b413fbb27475cec35cd85901 /create_config_inc.php
parentd122f068e33011ca50fb05d06505519c6a0aceab (diff)
downloadinstall-f8e358703ed5fd53b4e3400b7a6adfd2fa133f0f.tar.gz
install-f8e358703ed5fd53b4e3400b7a6adfd2fa133f0f.tar.bz2
install-f8e358703ed5fd53b4e3400b7a6adfd2fa133f0f.zip
check for directory existence to avoid NOTICE
Diffstat (limited to 'create_config_inc.php')
-rw-r--r--create_config_inc.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/create_config_inc.php b/create_config_inc.php
index 059dace..2d97602 100644
--- a/create_config_inc.php
+++ b/create_config_inc.php
@@ -47,8 +47,12 @@ function create_config( $pParamHash ) {
}
$config_file = empty( $_SERVER['CONFIG_INC'] ) ? '../config/kernel/config_inc.php' : $_SERVER['CONFIG_INC'];
- mkdir( dirname( dirname( $config_file ) ) );
- mkdir( dirname( $config_file ) );
+ if( !file_exists( dirname( dirname( $config_file ) ) ) ) {
+ mkdir( dirname( dirname( $config_file ) ) );
+ }
+ if( !file_exists( dirname( $config_file ) ) ) {
+ mkdir( dirname( $config_file ) );
+ }
// We can't call clean_file_path here even though we would like to.
$config_file = ( strpos( $_SERVER["SERVER_SOFTWARE"],"IIS" ) ? str_replace( "/", "\\", $config_file ) : $config_file );