aboutsummaryrefslogtreecommitdiff
path: root/classes/webhooks_table.php
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-03-12 01:32:50 +0300
committerValentin Popov <info@valentineus.link>2018-03-12 02:24:38 +0300
commit6a711bfc4842c0c1607039b8d0f73212635c21e4 (patch)
tree82e0b4b3555b7824318548fbe315c19a8f5b7121 /classes/webhooks_table.php
parent9ada0cfe7476f4e94d14682561a0f678088428e3 (diff)
downloadlocal_webhooks-6a711bfc4842c0c1607039b8d0f73212635c21e4.tar.xz
local_webhooks-6a711bfc4842c0c1607039b8d0f73212635c21e4.zip
Fixed a potential performance hole
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'classes/webhooks_table.php')
-rw-r--r--classes/webhooks_table.php4
1 files changed, 1 insertions, 3 deletions
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());
}