summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-01-03 12:18:27 +0100
committerGitHub <noreply@github.com>2017-01-03 12:18:27 +0100
commit71b4a45a4de4ffd8e502d9632ffb6c5c099da94e (patch)
tree5dcfdde2d114bb8356bfe5b4413c4d1ae2483e7c /system
parentb3f2e9bcc34c2046a56f34d2bc67dc65dbb61185 (diff)
parent8112b5341ec02d38e448e767ab95196df9a84a74 (diff)
Merge pull request #4958 from boxsnake/develop
Fix a bug where QB count_all_results() doesn't take into account qb_cache_orderby
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_query_builder.php2
1 files changed, 1 insertions, 1 deletions
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')));