From 325197e700564f8e4e0ba7c9fc82abfd85f451b0 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Mon, 20 Nov 2006 17:29:05 +0000 Subject: --- system/application/config/config.php | 4 ++-- system/codeigniter/Common.php | 8 ++++---- system/database/drivers/oci8/oci8_result.php | 24 +++++++++++------------- system/libraries/Exceptions.php | 6 ++++-- system/libraries/Input.php | 6 ++++-- system/libraries/User_agent.php | 1 + user_guide/changelog.html | 3 +++ user_guide/database/caching.html | 2 +- user_guide/database/helpers.html | 4 +++- user_guide/database/utilities.html | 2 +- user_guide/general/caching.html | 2 +- user_guide/general/core_classes.html | 8 ++++++++ user_guide/general/views.html | 8 ++++++++ user_guide/helpers/date_helper.html | 2 +- user_guide/helpers/smiley_helper.html | 2 +- user_guide/helpers/text_helper.html | 8 ++++---- user_guide/installation/downloads.html | 2 +- user_guide/libraries/config.html | 2 +- user_guide/libraries/file_uploading.html | 2 +- user_guide/libraries/ftp.html | 4 ++-- user_guide/libraries/sessions.html | 2 +- user_guide/libraries/unit_testing.html | 2 +- user_guide/libraries/xmlrpc.html | 2 +- 23 files changed, 65 insertions(+), 41 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 = '

'.implode('

', ( ! is_array($message)) ? array($message) : $message).'

'; - 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; } } diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 477814d7c..461142fd9 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -69,6 +69,9 @@ Change Log
  • Added support for naming custom library files in lower or uppercase.
  • Fixed a bug in the active record class that was not resetting query data after a completed query.
  • Fixed a bug that was supressing errors in controllers.
  • +
  • Fixed a problem that can cause a loop to occur when the config file is missing.
  • +
  • Fixed some bugs in the Oracle DB driver.
  • +
  • Fixed some doc typos.
  • diff --git a/user_guide/database/caching.html b/user_guide/database/caching.html index 9a16a8f8d..615f74c9d 100644 --- a/user_guide/database/caching.html +++ b/user_guide/database/caching.html @@ -216,7 +216,7 @@ Previous Topic:  Custom Function CallsTop of Page   ·   User Guide Home   ·   -Next Topic:  Database Export Class +Next Topic:  Database Utilities Class

    Code Igniter  ·  Copyright © 2006  ·  pMachine, Inc.

    diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html index 2b552f1c3..5ffe0c85c 100644 --- a/user_guide/database/helpers.html +++ b/user_guide/database/helpers.html @@ -117,6 +117,8 @@ $str = $this->db->insert_string('table_name', $data);

    The first parameter is the table name, the second is an associative array with the data to be inserted. The above example produces:

    INSERT INTO table_name (name, email, url) VALUES ('Rick', 'rick@your-site.com', 'www.your-site.com') +

    Note: Values are automatically escaped, producing safer queries.

    +

    $this->db->update_string();

    @@ -132,7 +134,7 @@ $str = $this->db->update_string('table_name', $data, $where);

    The first parameter is the table name, the second is an associative array with the data to be inserted, and the third parameter is the "where" clause. The above example produces:

    UPDATE exp_weblog SET name = 'Rick', email = 'rick@your-site.com', url = 'www.your-site.com' WHERE author_id = 1 AND status = 'active' - +

    Note: Values are automatically escaped, producing safer queries.

    diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html index a9227ab26..3027b68ed 100644 --- a/user_guide/database/utilities.html +++ b/user_guide/database/utilities.html @@ -325,7 +325,7 @@ $this->dbutil->backup($prefs); diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html index 1fa93bf17..25054c7e4 100644 --- a/user_guide/libraries/file_uploading.html +++ b/user_guide/libraries/file_uploading.html @@ -230,7 +230,7 @@ $config['max_size'] = '100';
    $config['max_width'] = '1024';
    $config['max_height'] = '768';

    -$this->load->library('ftp', $config);

    +$this->load->library('upload', $config);

    // Alternately you can set preferences by calling the initialize function. Useful if you auto-load the class:
    $this->upload->initialize($config);
    diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html index 0bec3a828..014b94d2a 100644 --- a/user_guide/libraries/ftp.html +++ b/user_guide/libraries/ftp.html @@ -63,8 +63,8 @@ FTP Class

    FTP Class

    -

    Code Igniter's FTP Class permits files to be uploaded, moved, renamed, and deleted on your server. It also includes a "mirroring" function -that permits a local directory to be recreated remotely via FTP.

    +

    Code Igniter's FTP Class permits files to be transfered to a remote server. Remote files can also be moved, renamed, +and deleted. The FTP class also includes a "mirroring" function that permits an entire local directory to be recreated remotely via FTP.

    Note:  SFTP and SSL FTP protocols are not supported, only standard FTP.

    diff --git a/user_guide/libraries/sessions.html b/user_guide/libraries/sessions.html index ed6260f44..017965288 100644 --- a/user_guide/libraries/sessions.html +++ b/user_guide/libraries/sessions.html @@ -238,7 +238,7 @@ If you would like a non-expiring session set the value to zero: 0 sess_encrypt_cookie -TRUE +FALSE TRUE/FALSE (boolean) Whether to encrypt the session data. diff --git a/user_guide/libraries/unit_testing.html b/user_guide/libraries/unit_testing.html index 692df0031..0ebb40116 100644 --- a/user_guide/libraries/unit_testing.html +++ b/user_guide/libraries/unit_testing.html @@ -155,7 +155,7 @@ will evaluate the above code as TRUE using a normal equality test:

    To enable strict mode use this:

    -$this->unit->strict(TRUE); +$this->unit->use_strict(TRUE);

    Enabling/Disabling Unit Testing

    diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html index 9421e0fea..01a88d78c 100644 --- a/user_guide/libraries/xmlrpc.html +++ b/user_guide/libraries/xmlrpc.html @@ -485,7 +485,7 @@ Previous Topic:  Validation Class    ·   Top of Page   ·   User Guide Home   ·   -Next Topic:  Array Helper +Next Topic:  Zip Encoding Class

    Code Igniter  ·  Copyright © 2006  ·  pMachine, Inc.

    -- cgit v1.2.3-24-g4f1b