summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/cache/.htaccess1
-rw-r--r--system/cache/index.html10
-rw-r--r--system/core/Output.php4
-rw-r--r--system/libraries/Log.php19
-rw-r--r--system/logs/index.html10
5 files changed, 11 insertions, 33 deletions
diff --git a/system/cache/.htaccess b/system/cache/.htaccess
deleted file mode 100644
index 3418e55a6..000000000
--- a/system/cache/.htaccess
+++ /dev/null
@@ -1 +0,0 @@
-deny from all \ No newline at end of file
diff --git a/system/cache/index.html b/system/cache/index.html
deleted file mode 100644
index c942a79ce..000000000
--- a/system/cache/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
- <title>403 Forbidden</title>
-</head>
-<body>
-
-<p>Directory access is forbidden.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/system/core/Output.php b/system/core/Output.php
index 0b708e110..c83b90f00 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -347,7 +347,7 @@ class CI_Output {
$CI =& get_instance();
$path = $CI->config->item('cache_path');
- $cache_path = ($path == '') ? BASEPATH.'cache/' : $path;
+ $cache_path = ($path == '') ? APPPATH.'cache/' : $path;
if ( ! is_dir($cache_path) OR ! is_really_writable($cache_path))
{
@@ -395,7 +395,7 @@ class CI_Output {
*/
function _display_cache(&$CFG, &$URI)
{
- $cache_path = ($CFG->item('cache_path') == '') ? BASEPATH.'cache/' : $CFG->item('cache_path');
+ $cache_path = ($CFG->item('cache_path') == '') ? APPPATH.'cache/' : $CFG->item('cache_path');
// Build the file path. The file name is an MD5 hash of the full URI
$uri = $CFG->item('base_url').
diff --git a/system/libraries/Log.php b/system/libraries/Log.php
index 6d44cfa4b..cb160a934 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.php
@@ -26,11 +26,11 @@
*/
class CI_Log {
- var $log_path;
- var $_threshold = 1;
- var $_date_fmt = 'Y-m-d H:i:s';
- var $_enabled = TRUE;
- var $_levels = array('ERROR' => '1', 'DEBUG' => '2', 'INFO' => '3', 'ALL' => '4');
+ protected $_log_path;
+ protected $_threshold = 1;
+ protected $_date_fmt = 'Y-m-d H:i:s';
+ protected $_enabled = TRUE;
+ protected $_levels = array('ERROR' => '1', 'DEBUG' => '2', 'INFO' => '3', 'ALL' => '4');
/**
* Constructor
@@ -39,9 +39,9 @@ class CI_Log {
{
$config =& get_config();
- $this->log_path = ($config['log_path'] != '') ? $config['log_path'] : BASEPATH.'logs/';
+ $this->_log_path = ($config['log_path'] != '') ? $config['log_path'] : APPPATH.'logs/';
- if ( ! is_dir($this->log_path) OR ! is_really_writable($this->log_path))
+ if ( ! is_dir($this->_log_path) OR ! is_really_writable($this->_log_path))
{
$this->_enabled = FALSE;
}
@@ -64,13 +64,12 @@ class CI_Log {
*
* Generally this function will be called using the global log_message() function
*
- * @access public
* @param string the error level
* @param string the error message
* @param bool whether the error is a native PHP error
* @return bool
*/
- function write_log($level = 'error', $msg, $php_error = FALSE)
+ public function write_log($level = 'error', $msg, $php_error = FALSE)
{
if ($this->_enabled === FALSE)
{
@@ -84,7 +83,7 @@ class CI_Log {
return FALSE;
}
- $filepath = $this->log_path.'log-'.date('Y-m-d').EXT;
+ $filepath = $this->_log_path.'log-'.date('Y-m-d').EXT;
$message = '';
if ( ! file_exists($filepath))
diff --git a/system/logs/index.html b/system/logs/index.html
deleted file mode 100644
index c942a79ce..000000000
--- a/system/logs/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
- <title>403 Forbidden</title>
-</head>
-<body>
-
-<p>Directory access is forbidden.</p>
-
-</body>
-</html> \ No newline at end of file