Fixed a potential performance hole

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
Valentin Popov 2018-03-12 02:32:50 +04:00
parent 9ada0cfe74
commit 6a711bfc48
Signed by: Valentin Popov
GPG Key ID: 269A00ACA90A8EA3

View File

@ -67,9 +67,7 @@ class local_webhooks_table extends table_sql {
* @param boolean $useinitialsbar
*/
public function query_db($pagesize, $useinitialsbar = false) {
$listrecords = local_webhooks_get_list_records();
$total = count($listrecords);
$total = local_webhooks_get_total_count();
$this->pagesize($pagesize, $total);
$this->rawdata = local_webhooks_get_list_records($this->get_page_start(), $this->get_page_size());
}