From 49439ff0a4deaac47e078c137216b0c410bd6ec4 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 30 Oct 2006 04:39:12 +0000 Subject: --- system/application/config/config.php | 29 +++++++++++++---------------- system/codeigniter/Common.php | 6 +++--- system/libraries/Config.php | 2 +- system/libraries/Loader.php | 4 ++-- system/libraries/Log.php | 2 +- user_guide/installation/upgrade_150.html | 14 +++++++++++++- 6 files changed, 33 insertions(+), 24 deletions(-) diff --git a/system/application/config/config.php b/system/application/config/config.php index fc4724010..3c3b423dc 100644 --- a/system/application/config/config.php +++ b/system/application/config/config.php @@ -142,20 +142,6 @@ $config['enable_query_strings'] = FALSE; $config['controller_trigger'] = 'c'; $config['function_trigger'] = 'm'; -/* -|-------------------------------------------------------------------------- -| Error Logging -|-------------------------------------------------------------------------- -| -<<<<<<< .mine -| Options are "local" or "gmt". This pref tells the system whether to use -| your server's local time as the master "now" reference, or convert it to -| GMT. See the "date helper" page of the user guide for information -| regarding date handling. -| -*/ -$config['time_reference'] = 'local'; - /* |-------------------------------------------------------------------------- | Error Logging Threshold @@ -163,10 +149,8 @@ $config['time_reference'] = 'local'; | | If you have enabled error logging, you can set an error threshold to | determine what gets logged. Threshold options are: -======= | You can enable error logging by setting a threshold over zero. The | threshold determines what gets logged. Threshold options are: ->>>>>>> .r388 | | 0 = Disables logging | 0 = Error logging TURNED OFF @@ -302,4 +286,17 @@ $config['compress_output'] = FALSE; $config['time_reference'] = 'local'; +/* +|-------------------------------------------------------------------------- +| Rewrite PHP Short Tags +|-------------------------------------------------------------------------- +| +| If your PHP installation does not have short tag support enabled CI +| can rewrite the tags on-the-fly, enabling you to utilize that syntax +| in your view files. Options are TRUE or FALSE (boolean) +| +*/ +$config['rewrite_short_tags'] = FALSE; + + ?> \ No newline at end of file diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php index 06e922084..41e13bee6 100644 --- a/system/codeigniter/Common.php +++ b/system/codeigniter/Common.php @@ -127,7 +127,7 @@ function &get_config() * @access public * @return mixed */ -function &config_item($item) +function config_item($item) { static $config_item = array(); @@ -197,7 +197,7 @@ function log_message($level = 'error', $message, $php_error = FALSE) { static $LOG; - $config = get_config(); + $config =& get_config(); if ($config['log_threshold'] == 0) { return; @@ -247,7 +247,7 @@ function _exception_handler($severity, $message, $filepath, $line) } // Should we log the error? No? We're done... - $config = get_config(); + $config =& get_config(); if ($config['log_threshold'] == 0) { return; diff --git a/system/libraries/Config.php b/system/libraries/Config.php index c4ea9b4ee..28409fbc4 100644 --- a/system/libraries/Config.php +++ b/system/libraries/Config.php @@ -44,7 +44,7 @@ class CI_Config { */ function CI_Config() { - $this->config = get_config(); + $this->config =& get_config(); log_message('debug', "Config Class Initialized"); } diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php index 709d9fe3d..117626567 100644 --- a/system/libraries/Loader.php +++ b/system/libraries/Loader.php @@ -606,7 +606,7 @@ class CI_Loader { // do a little string replacement, changing the short tags // to standard PHP echo statements. - if ((bool) @ini_get('short_open_tag') === FALSE) + if ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE) { echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('log_path = ($config['log_path'] != '') ? $config['log_path'] : BASEPATH.'logs/'; diff --git a/user_guide/installation/upgrade_150.html b/user_guide/installation/upgrade_150.html index 6ebc331d6..06d0c7027 100644 --- a/user_guide/installation/upgrade_150.html +++ b/user_guide/installation/upgrade_150.html @@ -101,7 +101,7 @@ $db['default']['cachedir'] = '';

Step 2: Update your config.php file

-

Open your application/config/config.php file and ADD this new item:

+

Open your application/config/config.php file and ADD these new items:

 /*
@@ -117,6 +117,18 @@ $db['default']['cachedir'] = '';
 |
 */
 $config['subclass_prefix'] = 'MY_';
+
+/*
+|--------------------------------------------------------------------------
+| Rewrite PHP Short Tags
+|--------------------------------------------------------------------------
+|
+| If your PHP installation does not have short tag support enabled CI
+| can rewrite the tags on-the-fly, enabling you to utilize that syntax
+| in your view files.  Options are TRUE or FALSE (boolean)
+|
+*/
+$config['rewrite_short_tags'] = FALSE;
 

In that same file REMOVE this item:

-- cgit v1.2.3-24-g4f1b