From 6a711bfc4842c0c1607039b8d0f73212635c21e4 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Mon, 12 Mar 2018 02:32:50 +0400 Subject: Fixed a potential performance hole Signed-off-by: Valentin Popov --- classes/webhooks_table.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'classes/webhooks_table.php') diff --git a/classes/webhooks_table.php b/classes/webhooks_table.php index 3e97a17..b38d0bd 100644 --- a/classes/webhooks_table.php +++ b/classes/webhooks_table.php @@ -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()); } -- cgit v1.2.3