From da60e9bc66ec90970fbd2dfd08b0a6e66b9f5f5f Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sat, 31 Dec 2016 08:46:18 -0800 Subject: Update copyright data to 2017 --- system/database/DB_query_builder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/DB_query_builder.php') diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index b88ec956a..661f5fe69 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2016, British Columbia Institute of Technology + * Copyright (c) 2014 - 2017, British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 -- cgit v1.2.3-24-g4f1b From 2cae5587fed1f1b448a48e978ab28f0af3e0ec88 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 13:18:27 +0200 Subject: Merge pull request #4958 from boxsnake/develop Fix a bug where QB count_all_results() doesn't take into account qb_cache_orderby --- system/database/DB_query_builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/DB_query_builder.php') diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 661f5fe69..3f1a8021a 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1402,7 +1402,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $this->qb_orderby = NULL; } - $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby)) + $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby) OR ! empty($this->qb_cache_groupby)) ? $this->query($this->_count_string.$this->protect_identifiers('numrows')."\nFROM (\n".$this->_compile_select()."\n) CI_count_all_results") : $this->query($this->_compile_select($this->_count_string.$this->protect_identifiers('numrows'))); -- cgit v1.2.3-24-g4f1b From 51c84f3a436ecfebe371177ba5537b9e475cc3c6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jan 2017 17:42:26 +0200 Subject: Fix #4804 --- system/database/DB_query_builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database/DB_query_builder.php') diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 3f1a8021a..ab19d97a2 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1553,7 +1553,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { is_bool($escape) OR $escape = $this->_protect_identifiers; - $keys = array_keys($this->_object_to_array(current($key))); + $keys = array_keys($this->_object_to_array(reset($key))); sort($keys); foreach ($key as $row) -- cgit v1.2.3-24-g4f1b