mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-27340 tablelib.php fix a notice when is false.
This commit is contained in:
parent
b8df9414bd
commit
d8a3b87c0e
@ -1348,9 +1348,9 @@ class table_sql extends flexible_table {
|
||||
$this->countsql = 'SELECT COUNT(1) FROM '.$this->sql->from.' WHERE '.$this->sql->where;
|
||||
$this->countparams = $this->sql->params;
|
||||
}
|
||||
$grandtotal = $DB->count_records_sql($this->countsql, $this->countparams);
|
||||
if ($useinitialsbar && !$this->is_downloading()) {
|
||||
$totalinitials = $DB->count_records_sql($this->countsql, $this->countparams);
|
||||
$this->initialbars($totalinitials>$pagesize);
|
||||
$this->initialbars($grandtotal > $pagesize);
|
||||
}
|
||||
|
||||
list($wsql, $wparams) = $this->get_sql_where();
|
||||
@ -1363,7 +1363,7 @@ class table_sql extends flexible_table {
|
||||
|
||||
$total = $DB->count_records_sql($this->countsql, $this->countparams);
|
||||
} else {
|
||||
$total = $totalinitials;
|
||||
$total = $grandtotal;
|
||||
}
|
||||
|
||||
$this->pagesize($pagesize, $total);
|
||||
|
Loading…
x
Reference in New Issue
Block a user