From e65f4893c9b3e7c2b34e0fef7c7de04112329063 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Wed, 23 May 2012 19:27:54 +0200 Subject: Removed the starting slash from uri_string() documentation. --- user_guide/libraries/uri.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide/libraries/uri.html b/user_guide/libraries/uri.html index f04bb9f10..663fca5bc 100644 --- a/user_guide/libraries/uri.html +++ b/user_guide/libraries/uri.html @@ -191,7 +191,7 @@ $str = $this->uri->assoc_to_uri($array);

The function would return this:

-/news/local/345 +news/local/345

$this->uri->ruri_string()

-- cgit v1.2.3-24-g4f1b From da981e4383c12ef182a95ee5aa88a8f8b5ee7632 Mon Sep 17 00:00:00 2001 From: Jamie Hurst Date: Thu, 24 May 2012 10:02:56 +0100 Subject: Adding width and height to list of clear variables to fix #1059 --- system/libraries/Image_lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 7f905128b..21ec2cb4b 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -104,7 +104,7 @@ class CI_Image_lib { */ function clear() { - $props = array('source_folder', 'dest_folder', 'source_image', 'full_src_path', 'full_dst_path', 'new_image', 'image_type', 'size_str', 'quality', 'orig_width', 'orig_height', 'rotation_angle', 'x_axis', 'y_axis', 'create_fnc', 'copy_fnc', 'wm_overlay_path', 'wm_use_truetype', 'dynamic_output', 'wm_font_size', 'wm_text', 'wm_vrt_alignment', 'wm_hor_alignment', 'wm_padding', 'wm_hor_offset', 'wm_vrt_offset', 'wm_font_color', 'wm_use_drop_shadow', 'wm_shadow_color', 'wm_shadow_distance', 'wm_opacity'); + $props = array('source_folder', 'dest_folder', 'source_image', 'full_src_path', 'full_dst_path', 'new_image', 'image_type', 'size_str', 'quality', 'orig_width', 'orig_height', 'width', 'height', 'rotation_angle', 'x_axis', 'y_axis', 'create_fnc', 'copy_fnc', 'wm_overlay_path', 'wm_use_truetype', 'dynamic_output', 'wm_font_size', 'wm_text', 'wm_vrt_alignment', 'wm_hor_alignment', 'wm_padding', 'wm_hor_offset', 'wm_vrt_offset', 'wm_font_color', 'wm_use_drop_shadow', 'wm_shadow_color', 'wm_shadow_distance', 'wm_opacity'); foreach ($props as $val) { -- cgit v1.2.3-24-g4f1b From c631a43f840f596df29dc7da39e078a83cabf099 Mon Sep 17 00:00:00 2001 From: Jamie Hurst Date: Thu, 24 May 2012 10:38:00 +0100 Subject: Updating change log relating to #1059. --- user_guide/changelog.html | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide/changelog.html b/user_guide/changelog.html index ca1a55bac..e0139775a 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -80,6 +80,7 @@ Change Log

Bug fixes for 2.1.1

    +
  • Fixed a bug (#1059) - CI_Image_lib::clear() was not correctly clearing all necessary object properties, namely width and height.
  • Fixed a bug (#697) - A wrong array key was used in the Upload library to check for mime-types.
  • Fixed a bug - form_open() compared $action against site_url() instead of base_url()
  • Fixed a bug - CI_Upload::_file_mime_type() could've failed if mime_content_type() is used for the detection and returns FALSE.
  • -- cgit v1.2.3-24-g4f1b From bc602d8b8e125597bfd557949e846ff5a258b858 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 24 May 2012 19:42:16 +0300 Subject: Fix issue #1387 --- system/database/DB_active_rec.php | 4 ++-- system/database/DB_driver.php | 22 ++++++++++++---------- user_guide/changelog.html | 4 ++-- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 841ede28e..10febb1fc 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -255,7 +255,7 @@ class CI_DB_active_record extends CI_DB_driver { */ public function from($from) { - foreach ((array)$from as $val) + foreach ((array) $from as $val) { if (strpos($val, ',') !== FALSE) { @@ -1647,7 +1647,7 @@ class CI_DB_active_record extends CI_DB_driver { if (strpos($table, " ") !== FALSE) { // if the alias is written with the AS keyword, remove it - $table = preg_replace('/ AS /i', ' ', $table); + $table = preg_replace('/\s+AS\s+/i', ' ', $table); // Grab the alias $table = trim(strrchr($table, " ")); diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 6161f149b..c25752824 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1263,15 +1263,20 @@ class CI_DB_driver { } // Convert tabs or multiple spaces into single spaces - $item = preg_replace('/[\t ]+/', ' ', $item); + $item = preg_replace('/\s+/', ' ', $item); // If the item has an alias declaration we remove it and set it aside. // Basically we remove everything to the right of the first space - $alias = ''; - if (strpos($item, ' ') !== FALSE) + if (preg_match('/^([^\s]+) (AS )*(.+)$/i', $item, $matches)) { - $alias = strstr($item, " "); - $item = substr($item, 0, - strlen($alias)); + $item = $matches[1]; + + // Escape the alias + $alias = ' '.$matches[2].$this->escape_identifiers($matches[3]); + } + else + { + $alias = ''; } // This is basically a bug fix for queries that use MAX, MIN, etc. @@ -1387,7 +1392,7 @@ class CI_DB_driver { return $item.$alias; } - + // -------------------------------------------------------------------- /** @@ -1395,16 +1400,13 @@ class CI_DB_driver { * * This function is used extensively by every db driver. * - * @access private * @return void */ protected function _reset_select() { - } } - /* End of file DB_driver.php */ -/* Location: ./system/database/DB_driver.php */ +/* Location: ./system/database/DB_driver.php */ \ No newline at end of file diff --git a/user_guide/changelog.html b/user_guide/changelog.html index e0139775a..266ae8652 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -80,7 +80,6 @@ Change Log

    Bug fixes for 2.1.1

      -
    • Fixed a bug (#1059) - CI_Image_lib::clear() was not correctly clearing all necessary object properties, namely width and height.
    • Fixed a bug (#697) - A wrong array key was used in the Upload library to check for mime-types.
    • Fixed a bug - form_open() compared $action against site_url() instead of base_url()
    • Fixed a bug - CI_Upload::_file_mime_type() could've failed if mime_content_type() is used for the detection and returns FALSE.
    • @@ -88,8 +87,9 @@ Change Log
    • Fixed a bug - When database caching was enabled, $this->db->query() checked the cache before binding variables which resulted in cached queries never being found.
    • Fixed a bug - CSRF cookie value was allowed to be any (non-empty) string before being written to the output, making code injection a risk.
    • Fixed a bug (#726) - PDO put a 'dbname' argument in it's connection string regardless of the database platform in use, which made it impossible to use SQLite.
    • -
    • Fixed a bug - CI_DB_pdo_driver::affect_row was not being initialized properly with SELECT queries, cause it was relying on PDOStatement::rowCount().
    • Fixed a bug - CI_DB_pdo_result::num_rows() was not returning properly value with SELECT queries, cause it was relying on PDOStatement::rowCount().
    • +
    • Fixed a bug (#1059) - CI_Image_lib::clear() was not correctly clearing all necessary object properties, namely width and height.
    • +
    • Fixed a bug (#1387) - Active Record's from() method didn't escape table aliases.
    -- cgit v1.2.3-24-g4f1b