From 7cf682abf46bcaa112b63c500a884ba25c0dd8b3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 13 Mar 2014 14:55:45 +0200 Subject: Partially revert PR #2190 The core shouldn't depend on constants that are not defined by itself --- system/database/DB_cache.php | 6 +++--- system/database/DB_driver.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'system/database') diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index 0ab9c5d6b..b855ff24e 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -158,12 +158,12 @@ class CI_DB_Cache { if ( ! is_dir($dir_path)) { - if ( ! @mkdir($dir_path, DIR_WRITE_MODE)) + if ( ! @mkdir($dir_path, 0777)) { return FALSE; } - @chmod($dir_path, DIR_WRITE_MODE); + @chmod($dir_path, 0777); } if (write_file($dir_path.$filename, serialize($object)) === FALSE) @@ -171,7 +171,7 @@ class CI_DB_Cache { return FALSE; } - @chmod($dir_path.$filename, FILE_WRITE_MODE); + @chmod($dir_path.$filename, 0666); return TRUE; } diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index b004de355..fafce45c7 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1676,7 +1676,7 @@ abstract class CI_DB_driver { $error =& load_class('Exceptions', 'core'); echo $error->show_error($heading, $message, 'error_db'); - exit(EXIT_DATABASE); + exit(8); // EXIT_DATABASE } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b