From 4761451a6d41730653eaf1b5cac2a4d1b997714a Mon Sep 17 00:00:00 2001 From: Mark Unwin Date: Fri, 20 Oct 2017 11:52:03 +1000 Subject: [PATCH 1/2] Fix total + filtered for /configuration collection (only). Because we manually calculate a couple of items and add them to the set retrieved from the database. --- code_igniter/application/controllers/include_collection.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code_igniter/application/controllers/include_collection.php b/code_igniter/application/controllers/include_collection.php index 0bf0e7383..53fe99eed 100644 --- a/code_igniter/application/controllers/include_collection.php +++ b/code_igniter/application/controllers/include_collection.php @@ -52,6 +52,10 @@ } } +if ($this->response->meta->collection == 'configuration') { + $this->response->meta->total = $this->response->meta->filtered; +} + output($this->response); $log = new stdClass(); From fd40be1d9934f8aaafce742219d8399645e3c9c9 Mon Sep 17 00:00:00 2001 From: Mark Unwin Date: Fri, 20 Oct 2017 11:52:25 +1000 Subject: [PATCH 2/2] Fix syntax error on configuration population. --- other/openaudit_mysql.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/openaudit_mysql.sql b/other/openaudit_mysql.sql index 2b27bedcb..b39c80bbf 100644 --- a/other/openaudit_mysql.sql +++ b/other/openaudit_mysql.sql @@ -527,7 +527,7 @@ INSERT INTO `configuration` VALUES (53,'database_show_row_limit','1000','number' INSERT INTO `configuration` VALUES (54,'collector_check_minutes','15','number','y','system','2000-01-01 00:00:00','The default check interval for collectors.'); INSERT INTO `configuration` VALUES (55,'page_size','1000','number','y','system','2000-01-01 00:00:00','The default limit of rows to retrieve.'); INSERT INTO `configuration` VALUES (56,'discovery_linux_use_sudo','y','bool','y','system','2000-01-01 00:00:00','When running discovery commands on a Linux target, should we use sudo.'); -INSERT INTO `configuration` VALUES (57,'delete_noncurrent_netstat','y','bool','y','system','2000-01-01 00:00:00','Should we store non-current netstat data and generate change logs.') +INSERT INTO `configuration` VALUES (57,'delete_noncurrent_netstat','y','bool','y','system','2000-01-01 00:00:00','Should we store non-current netstat data and generate change logs.'); INSERT INTO `configuration` VALUES (58,'delete_noncurrent_variable','y','bool','y','system','2000-01-01 00:00:00','Should we store non-current environment variable data and generate change logs.'); /*!40000 ALTER TABLE `configuration` ENABLE KEYS */; UNLOCK TABLES;