Permalink
Browse files

MDL-27035 table_sql forgets to set countparams.

  • Loading branch information...
1 parent 408612d commit ba63612bfa157c395de0f43d142aa364ba33d5db @timhunt timhunt committed Mar 30, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/tablelib.php
View
@@ -1346,6 +1346,7 @@ function query_db($pagesize, $useinitialsbar=true){
if (!$this->is_downloading()) {
if ($this->countsql === NULL){
$this->countsql = 'SELECT COUNT(1) FROM '.$this->sql->from.' WHERE '.$this->sql->where;
+ $this->countparams = $this->sql->params;
}
if ($useinitialsbar && !$this->is_downloading()) {
$totalinitials = $DB->count_records_sql($this->countsql, $this->countparams);

0 comments on commit ba63612

Please sign in to comment.