mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-27340 tablelib.php fix a notice when is false.
This commit is contained in:
parent
b8df9414bd
commit
d8a3b87c0e
1 changed files with 3 additions and 3 deletions
|
@ -1348,9 +1348,9 @@ class table_sql extends flexible_table {
|
||||||
$this->countsql = 'SELECT COUNT(1) FROM '.$this->sql->from.' WHERE '.$this->sql->where;
|
$this->countsql = 'SELECT COUNT(1) FROM '.$this->sql->from.' WHERE '.$this->sql->where;
|
||||||
$this->countparams = $this->sql->params;
|
$this->countparams = $this->sql->params;
|
||||||
}
|
}
|
||||||
|
$grandtotal = $DB->count_records_sql($this->countsql, $this->countparams);
|
||||||
if ($useinitialsbar && !$this->is_downloading()) {
|
if ($useinitialsbar && !$this->is_downloading()) {
|
||||||
$totalinitials = $DB->count_records_sql($this->countsql, $this->countparams);
|
$this->initialbars($grandtotal > $pagesize);
|
||||||
$this->initialbars($totalinitials>$pagesize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
list($wsql, $wparams) = $this->get_sql_where();
|
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);
|
$total = $DB->count_records_sql($this->countsql, $this->countparams);
|
||||||
} else {
|
} else {
|
||||||
$total = $totalinitials;
|
$total = $grandtotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->pagesize($pagesize, $total);
|
$this->pagesize($pagesize, $total);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue