summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Aker <greg.aker@ellislab.com>2010-12-21 18:44:08 +0100
committerGreg Aker <greg.aker@ellislab.com>2010-12-21 18:44:08 +0100
commit2eaa4074ea007cec58a802f591b4641b043213d1 (patch)
tree760887a7759177b1d58f97068bf74fe005fe5af0
parent11eb2dcb181c4518d19646867e499c85d449208e (diff)
Moving system/{logs,cache} to the application directory.
-rw-r--r--application/cache/.htaccess (renamed from system/cache/.htaccess)0
-rw-r--r--application/cache/index.html (renamed from system/cache/index.html)0
-rw-r--r--application/logs/index.html (renamed from system/logs/index.html)0
-rw-r--r--system/core/Output.php4
-rw-r--r--system/libraries/Log.php19
-rw-r--r--user_guide/changelog.html1
6 files changed, 12 insertions, 12 deletions
diff --git a/system/cache/.htaccess b/application/cache/.htaccess
index 3418e55a6..3418e55a6 100644
--- a/system/cache/.htaccess
+++ b/application/cache/.htaccess
diff --git a/system/cache/index.html b/application/cache/index.html
index c942a79ce..c942a79ce 100644
--- a/system/cache/index.html
+++ b/application/cache/index.html
diff --git a/system/logs/index.html b/application/logs/index.html
index c942a79ce..c942a79ce 100644
--- a/system/logs/index.html
+++ b/application/logs/index.html
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/user_guide/changelog.html b/user_guide/changelog.html
index 68abaff27..251f6fbd9 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -69,6 +69,7 @@ Hg Tag: </p>
<li>Plugins have been removed, in favor of Helpers. The CAPTCHA plugin has been converted to a Helper and <a href="./helpers/captcha_helper.html">documented</a>. The JavaScript calendar plugin was removed due to the ready availability of great JavaScript calendars, particularly with jQuery.</li>
<li>Added new special Library type: <a href="./general/drivers.html">Drivers</a>.</li>
<li>Moved the application folder outside of the system folder.</li>
+ <li>Moved system/cache and system/logs directories to the application directory.</li>
<li>Added routing overrides to the main index.php file, enabling the normal routing to be overridden on a per "index" file basis.</li>
<li>Added the ability to set config values (or override config values) directly from data set in the main index.php file. This allows a single application to be used with multiple front controllers, each having its own config values.</li>
<li>Added <kbd>$config['directory_trigger']</kbd> to the config file so that a controller sub-directory can be specified when running _GET strings instead of URI segments.</li>