added constants.php file and implemented constants for file system modes
diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php
index 866be35..04936b9 100644
--- a/system/codeigniter/CodeIgniter.php
+++ b/system/codeigniter/CodeIgniter.php
@@ -43,7 +43,14 @@
* ------------------------------------------------------
*/
require(BASEPATH.'codeigniter/Compat'.EXT);
-
+
+/*
+ * ------------------------------------------------------
+ * Load the compatibility override functions
+ * ------------------------------------------------------
+ */
+require(APPPATH.'config/constants'.EXT);
+
/*
* ------------------------------------------------------
* Define a custom error handler so we can log PHP errors
diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php
index d9ddf80..4554a71 100644
--- a/system/codeigniter/Common.php
+++ b/system/codeigniter/Common.php
@@ -52,7 +52,7 @@
}
fclose($fp);
- @chmod($file, 0777);
+ @chmod($file, DIR_WRITE_MODE);
@unlink($file);
return TRUE;
}