From a632589001aa9ec769f9a80871097ce3a09b74d1 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Mon, 12 May 2008 17:51:47 +0000 Subject: Fixed a bug in AR compiling, where select statements with arguments got incorrectly escaped (#3478). --- system/database/DB_active_rec.php | 13 ++++++++++--- user_guide/changelog.html | 7 ++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index a4ef2e4db..9a7ef5def 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -95,7 +95,14 @@ class CI_DB_active_record extends CI_DB_driver { { if (is_string($select)) { - $select = explode(',', $select); + if ($protect_identifiers !== FALSE) + { + $select = explode(',', $select); + } + else + { + $select = array($select); + } } foreach ($select as $val) @@ -1749,6 +1756,6 @@ class CI_DB_active_record extends CI_DB_driver { } } - -/* End of file DB_active_rec.php */ + +/* End of file DB_active_rec.php */ /* Location: ./system/database/DB_active_rec.php */ \ No newline at end of file diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 35f67fd16..de579f1ac 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -123,20 +123,21 @@ SVN Commit: not currently released

  • Fixed assorted user guide typos (#3453, #4364, #4379, #4399, #4408, #4412, #4448, #4488).
  • Fixed DB Driver and MySQLi result driver checking for resources instead of objects (#3461).
  • Fixed an incorrect documentation of $this->load->language (#3520).
  • +
  • Fixed a bug in DB Forge, when inserting an id field (#3456).
  • +
  • Fixed a bug in the table library that could cause identically constructed rows to be dropped (#3459).
  • Fixed an AR_caching error where it wasn't tracking table aliases (#3463).
  • +
  • Fixed a bug in AR compiling, where select statements with arguments got incorrectly escaped (#3478).
  • Fixed an AR bug with or_where_not_in() (#4171).
  • Fixed a bug in the FTP library where delete_dir() was not working recursively (#4215).
  • Fixed a Validation bug when set_rules() is used with a non-array field name and rule (#4220).
  • Fixed a bug in the Upload library that might output the same error twice (#4390).
  • Fixed an AR bug when joining with a table alias and table prefix (#4400).
  • -
  • Fixed a bug in DB Forge, when inserting an id field (#3456).
  • Fixed a bug in the DB class testing the $params argument.
  • Fixed a bug in the Table library where the integer 0 in cell data would be displayed as a blank cell.
  • Fixed bugs (#3523, #4350) in get_filenames() with recursion and problems with Windows when $include_path is used.
  • Fixed a bug (#4413) where a URI containing slashes only e.g. 'http://example.com/index.php?//' would result in PHP errors
  • Fixed a bug in link_tag() of the URL helper where a key was passed instead of a value.
  • Fixed a bug in DB_result::row() that prevented it from returning individual fields with MySQL NULL values.
  • -
  • Fixed a bug in the table library that could cause identically constructed rows to be dropped (#3459).
  • Fixed a bug (#4206) in the Directory Helper where the directory resource was not being closed, and minor improvements.
  • Fixed a bug (#4223) where DB caching would not work for returned DB objects or multiple DB connections.
  • Fixed a bug where SMTP emails were not having dot transformation performed on lines that begin with a dot.
  • @@ -144,7 +145,7 @@ SVN Commit: not currently released

  • Fixed an array to string conversion error in the Validation library (#4425)
  • Fixed a bug (#4506) with overlay_watermark() in the Image library preventing support for PNG-24s with alpha transparency
  • Fixed a bug (#4153) in the XML-RPC class preventing dateTime.iso8601 from being used.
  • - +

    Version 1.6.1

    Release Date: February 12, 2008
    -- cgit v1.2.3-24-g4f1b