summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-08-27 19:40:11 +0200
committerAndrey Andreev <narf@devilix.net>2014-08-27 19:40:11 +0200
commit459657415189f4fe3f8d4eb05b209ab78409f9b0 (patch)
treedbf460e9df735ebb39757f6a7afab4f43c73da01 /system/database
parent487ccc9c8a21cb6338aab7173b3adda194d29c26 (diff)
Fix #2963
Changed all file permissions settings throught the framework and the documentation. Also added configuration settings for CI_Log and CI_Image_lib
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_cache.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index b855ff24e..2efb42c5c 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.php
@@ -156,14 +156,9 @@ class CI_DB_Cache {
$dir_path = $this->db->cachedir.$segment_one.'+'.$segment_two.'/';
$filename = md5($sql);
- if ( ! is_dir($dir_path))
+ if ( ! is_dir($dir_path) && ! @mkdir($dir_path, 0750))
{
- if ( ! @mkdir($dir_path, 0777))
- {
- return FALSE;
- }
-
- @chmod($dir_path, 0777);
+ return FALSE;
}
if (write_file($dir_path.$filename, serialize($object)) === FALSE)
@@ -171,7 +166,7 @@ class CI_DB_Cache {
return FALSE;
}
- @chmod($dir_path.$filename, 0666);
+ chmod($dir_path.$filename, 0640);
return TRUE;
}