MDL-27035 table_sql forgets to set countparams.
This commit is contained in:
@@ -1346,6 +1346,7 @@ class table_sql extends flexible_table {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user