MDL-27035 table_sql forgets to set countparams.

This commit is contained in:
Tim Hunt
2011-03-30 20:25:43 +01:00
parent dae6b38c51
commit 71811083ba
+1
View File
@@ -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);