diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2006-11-20 18:29:05 +0100 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2006-11-20 18:29:05 +0100 |
commit | 325197e700564f8e4e0ba7c9fc82abfd85f451b0 (patch) | |
tree | c109f0c96f187dc3b919aca591daf5767de4c982 /system | |
parent | ebfa686046bb98c757d1b41c81eb867478036e68 (diff) |
Diffstat (limited to 'system')
-rw-r--r-- | system/application/config/config.php | 4 | ||||
-rw-r--r-- | system/codeigniter/Common.php | 8 | ||||
-rw-r--r-- | system/database/drivers/oci8/oci8_result.php | 24 | ||||
-rw-r--r-- | system/libraries/Exceptions.php | 6 | ||||
-rw-r--r-- | system/libraries/Input.php | 6 | ||||
-rw-r--r-- | system/libraries/User_agent.php | 1 |
6 files changed, 26 insertions, 23 deletions
diff --git a/system/application/config/config.php b/system/application/config/config.php index 2f385a6ef..b1598b341 100644 --- a/system/application/config/config.php +++ b/system/application/config/config.php @@ -223,9 +223,9 @@ $config['encryption_key'] = ""; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_encrypt_cookie'] = FALSE; -$config['sess_use_database'] = TRUE; +$config['sess_use_database'] = FALSE; $config['sess_table_name'] = 'ci_sessions'; -$config['sess_match_ip'] = TRUE; +$config['sess_match_ip'] = FALSE; $config['sess_match_useragent'] = TRUE; /* diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php index 41e13bee6..4576cd964 100644 --- a/system/codeigniter/Common.php +++ b/system/codeigniter/Common.php @@ -106,14 +106,14 @@ function &get_config() { if ( ! file_exists(APPPATH.'config/config'.EXT)) { - show_error('The configuration file config'.EXT.' does not exist.'); + exit('The configuration file config'.EXT.' does not exist.'); } require(APPPATH.'config/config'.EXT); if ( ! isset($config) OR ! is_array($config)) { - show_error('Your config file does not appear to be formatted correctly.'); + exit('Your config file does not appear to be formatted correctly.'); } $main_conf[0] =& $config; @@ -210,8 +210,8 @@ function log_message($level = 'error', $message, $php_error = FALSE) /** * Exception Handler * -* This is the custom exception handler we defined at the -* top of this file. The main reason we use this is permit +* This is the custom exception handler that is declaired at the top +* of Codeigniter.php. The main reason we use this is permit * PHP errors to be logged in our own log files since we may * not have access to server logs. Since this function * effectively intercepts PHP errors, however, we also need diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index af30457b3..fb4ed1f0d 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -31,21 +31,24 @@ class CI_DB_oci8_result extends CI_DB_result { var $limit_used; /** - * Number of rows in the result set + * Number of rows in the result set. + * + * Oracle doesn't have a graceful way to retun the number of rows + * so we have to use what amounts to a hack. + * * * @access public * @return integer */ function num_rows() { - if (function_exists('oci_num_rows')) - { - return @oci_num_rows($this->stmt_id); - } - else + $rowcount = count($this->result_array()); + @ociexecute($this->stmt_id); + if ($this->curs_id) { - return @ocirowcount($this->stmt_id); + @ociexecute($this->curs_id); } + return $rowcount; } // -------------------------------------------------------------------- @@ -175,12 +178,7 @@ class CI_DB_oci8_result extends CI_DB_result { { $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id; - while ($row = oci_fetch_object($id)) - { - $result[] = $row; - } - - return $result; + return @oci_fetch_object($id); } // If PHP 4 is being used we have to build our own result diff --git a/system/libraries/Exceptions.php b/system/libraries/Exceptions.php index 8f90ff8f9..839093911 100644 --- a/system/libraries/Exceptions.php +++ b/system/libraries/Exceptions.php @@ -30,6 +30,7 @@ class CI_Exceptions { var $message; var $filename; var $line; + var $ob_level; var $levels = array( E_ERROR => 'Error', @@ -53,6 +54,7 @@ class CI_Exceptions { */ function CI_Exceptions() { + $this->ob_level = ob_get_level(); // Note: Do not log messages from this constructor. } @@ -115,7 +117,7 @@ class CI_Exceptions { { $message = '<p>'.implode('</p><p>', ( ! is_array($message)) ? array($message) : $message).'</p>'; - if (ob_get_level() > 1) + if (ob_get_level() > $this->ob_level + 1) { ob_end_flush(); } @@ -151,7 +153,7 @@ class CI_Exceptions { $filepath = $x[count($x)-2].'/'.end($x); } - if (ob_get_level() > 1) + if (ob_get_level() > $this->ob_level + 1) { ob_end_flush(); } diff --git a/system/libraries/Input.php b/system/libraries/Input.php index b630bf6b8..801762073 100644 --- a/system/libraries/Input.php +++ b/system/libraries/Input.php @@ -73,13 +73,15 @@ class CI_Input { { if ( ! is_array($global)) { - unset($$global); + global $global; + $$global = NULL; } else { foreach ($global as $key => $val) { - unset($$key); + global $$key; + $$key = NULL; } } } diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index 8d160672f..95eccd124 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -186,6 +186,7 @@ class CI_User_agent { $this->is_browser = TRUE; $this->version = $match[1]; $this->browser = $val; + $this->_set_mobile(); return TRUE; } } |