From 3ad8efe07deb3ec27a205815dc9097c20c728e9b Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 4 Apr 2008 18:56:04 +0000 Subject: added constants.php file and implemented constants for file system modes --- system/database/DB_cache.php | 6 +++--- system/database/drivers/sqlite/sqlite_driver.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'system/database') diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index ad54fc315..08394da29 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -129,12 +129,12 @@ class CI_DB_Cache { if ( ! @is_dir($dir_path)) { - if ( ! @mkdir($dir_path, 0777)) + if ( ! @mkdir($dir_path, DIR_WRITE_MODE)) { return FALSE; } - @chmod($dir_path, 0777); + @chmod($dir_path, DIR_WRITE_MODE); } if (write_file($dir_path.$filename, serialize($object)) === FALSE) @@ -142,7 +142,7 @@ class CI_DB_Cache { return FALSE; } - @chmod($dir_path.$filename, 0777); + @chmod($dir_path.$filename, DIR_WRITE_MODE); return TRUE; } diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index c859dea6e..16a8308c1 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -48,7 +48,7 @@ class CI_DB_sqlite_driver extends CI_DB { */ function db_connect() { - if ( ! $conn_id = @sqlite_open($this->database, 0666, $error)) + if ( ! $conn_id = @sqlite_open($this->database, FILE_WRITE_MODE, $error)) { log_message('error', $error); @@ -73,7 +73,7 @@ class CI_DB_sqlite_driver extends CI_DB { */ function db_pconnect() { - if ( ! $conn_id = @sqlite_popen($this->database, 0666, $error)) + if ( ! $conn_id = @sqlite_popen($this->database, FILE_WRITE_MODE, $error)) { log_message('error', $error); -- cgit v1.2.3-24-g4f1b