Index: html/includes/search/accesspoints.inc.php
===================================================================
--- html/includes/search/accesspoints.inc.php	(revision 13049)
+++ html/includes/search/accesspoints.inc.php	(working copy)
@@ -12,7 +12,7 @@
 
 /// SEARCH ACCESSPOINTS
 $results = dbFetchRows("SELECT * FROM `wifi_aps`" .
-                       generate_where_clause($cache['where']['device_permitted'], '`ap_name` LIKE ?') .
+                       generate_where_clause($cache['where']['devices_permitted'], '`ap_name` LIKE ?') .
                        " ORDER BY `ap_name` LIMIT $query_limit", [$query_param]);
 
 if (!safe_empty($results)) {
Index: html/includes/search/devices.inc.php
===================================================================
--- html/includes/search/devices.inc.php	(revision 13049)
+++ html/includes/search/devices.inc.php	(working copy)
@@ -22,7 +22,7 @@
 $params = [$query_param, $query_param, $query_param, $query_param, $query_param, $query_param, $query_param, $query_param];
 
 $sql = "SELECT * FROM `devices`" .
-       generate_where_clause($GLOBALS['cache']['where']['device_permitted'], $where) . "
+       generate_where_clause($GLOBALS['cache']['where']['devices_permitted'], $where) . "
         ORDER BY `hostname` LIMIT $query_limit";
 
 $results = dbFetchRows($sql, $params);
Index: html/includes/search/inventory.inc.php
===================================================================
--- html/includes/search/inventory.inc.php	(revision 13049)
+++ html/includes/search/inventory.inc.php	(working copy)
@@ -13,7 +13,7 @@
 /// SEARCH STATUS
 $results = dbFetchRows("SELECT * FROM `entPhysical`
                         LEFT JOIN `devices` USING (`device_id`)" .
-                       generate_where_clause($GLOBALS['cache']['where']['device_permitted'], '`deleted` IS NULL AND (`entPhysicalSerialNum` LIKE ? OR `entPhysicalModelName` LIKE ? OR `entPhysicalAssetID` LIKE ?)') .
+                       generate_where_clause($GLOBALS['cache']['where']['devices_permitted'], '`deleted` IS NULL AND (`entPhysicalSerialNum` LIKE ? OR `entPhysicalModelName` LIKE ? OR `entPhysicalAssetID` LIKE ?)') .
                        " ORDER BY `entPhysicalName` LIMIT $query_limit", [$query_param, $query_param, $query_param]);
 
 if (!safe_empty($results)) {
Index: html/includes/search/ip-addresses.inc.php
===================================================================
--- html/includes/search/ip-addresses.inc.php	(revision 13049)
+++ html/includes/search/ip-addresses.inc.php	(working copy)
@@ -16,10 +16,10 @@
 
 if (preg_match('/^(?:(?<both>\d+)|(?<ipv6>[\d\:abcdef]+)|(?<ipv4>[\d\.]+))$/i', $addr, $matches)) {
     $query_ipv4 = 'SELECT `device_id`, `port_id`, `ipv4_address` AS `ip_address`, `ipv4_prefixlen` AS `ip_prefixlen` FROM `ipv4_addresses`';
-    $query_ipv4 .= generate_where_clause($GLOBALS['cache']['where']['device_permitted'], '`ipv4_address` LIKE ?');
+    $query_ipv4 .= generate_where_clause($GLOBALS['cache']['where']['devices_permitted'], '`ipv4_address` LIKE ?');
 
     $query_ipv6 = 'SELECT `device_id`, `port_id`, `ipv6_compressed` AS `ip_address`, `ipv6_prefixlen` AS `ip_prefixlen` FROM `ipv6_addresses`';
-    $query_ipv6 .= generate_where_clause($GLOBALS['cache']['where']['device_permitted'], '(`ipv6_address` LIKE ? OR `ipv6_compressed` LIKE ?)');
+    $query_ipv6 .= generate_where_clause($GLOBALS['cache']['where']['devices_permitted'], '(`ipv6_address` LIKE ? OR `ipv6_compressed` LIKE ?)');
 
     $query_end   = " ORDER BY `ip_address` LIMIT $query_limit";
     $query_param = "%$addr%";
Index: html/includes/search/loadbalancers.inc.php
===================================================================
--- html/includes/search/loadbalancers.inc.php	(revision 13049)
+++ html/includes/search/loadbalancers.inc.php	(working copy)
@@ -13,7 +13,7 @@
 // Netscaler Vservers
 
 $results = dbFetchRows("SELECT * FROM `netscaler_vservers`" .
-                       generate_where_clause('(`vsvr_label` LIKE ? OR `vsvr_ip` LIKE ? OR `vsvr_ipv6` LIKE ?)', $GLOBALS['cache']['where']['device_permitted']) .
+                       generate_where_clause('(`vsvr_label` LIKE ? OR `vsvr_ip` LIKE ? OR `vsvr_ipv6` LIKE ?)', $GLOBALS['cache']['where']['devices_permitted']) .
                        " ORDER BY `vsvr_label` LIMIT $query_limit", [$query_param, $query_param, $query_param]);
 
 $max_len = 35;
@@ -50,7 +50,7 @@
 }
 
 $results = dbFetchRows("SELECT * FROM `netscaler_services` " .
-                       generate_where_clause('(`svc_label` LIKE ? OR `svc_ip` LIKE ?)', $GLOBALS['cache']['where']['device_permitted']) .
+                       generate_where_clause('(`svc_label` LIKE ? OR `svc_ip` LIKE ?)', $GLOBALS['cache']['where']['devices_permitted']) .
                        " ORDER BY `svc_label` LIMIT $query_limit", [ $query_param, $query_param ]);
 
 if (!safe_empty($results)) {
@@ -85,7 +85,7 @@
 }
 
 $results = dbFetchRows("SELECT * FROM `netscaler_servicegroupmembers` " .
-                       generate_where_clause('(`svc_label` LIKE ? OR `svc_ip` LIKE ?)', $GLOBALS['cache']['where']['device_permitted']) .
+                       generate_where_clause('(`svc_label` LIKE ? OR `svc_ip` LIKE ?)', $GLOBALS['cache']['where']['devices_permitted']) .
                        " ORDER BY `svc_label` LIMIT $query_limit", [$query_param, $query_param]);
 
 if (!safe_empty($results)) {
@@ -121,7 +121,7 @@
 // F5 Virtuals
 
 $results = dbFetchRows("SELECT * FROM `lb_virtuals` " .
-                       generate_where_clause('(`virt_name` LIKE ? OR `virt_ip` LIKE ?)', $GLOBALS['cache']['where']['device_permitted']) .
+                       generate_where_clause('(`virt_name` LIKE ? OR `virt_ip` LIKE ?)', $GLOBALS['cache']['where']['devices_permitted']) .
                        " ORDER BY `virt_name` LIMIT $query_limit", [$query_param, $query_param]);
 
 if (!safe_empty($results)) {
@@ -148,7 +148,7 @@
 // F5 Virtuals
 
 $results = dbFetchRows("SELECT * FROM `lb_virtuals` " .
-                       generate_where_clause('(`virt_name` LIKE ? OR `virt_ip` LIKE ?)', $GLOBALS['cache']['where']['device_permitted']) .
+                       generate_where_clause('(`virt_name` LIKE ? OR `virt_ip` LIKE ?)', $GLOBALS['cache']['where']['devices_permitted']) .
                        " ORDER BY `virt_name` LIMIT $query_limit", [$query_param, $query_param]);
 
 if (!safe_empty($results)) {
Index: html/includes/search/neighbours.inc.php
===================================================================
--- html/includes/search/neighbours.inc.php	(revision 13049)
+++ html/includes/search/neighbours.inc.php	(working copy)
@@ -19,7 +19,7 @@
 
 /// SEARCH NEIGHBOURS
 $sql     = "SELECT * FROM `neighbours`" .
-           generate_where_clause($GLOBALS['cache']['where']['device_permitted'], '`active` = ? AND (`remote_hostname` LIKE ? OR `remote_address` LIKE ? OR `remote_platform` LIKE ?)') .
+           generate_where_clause($GLOBALS['cache']['where']['devices_permitted'], '`active` = ? AND (`remote_hostname` LIKE ? OR `remote_address` LIKE ? OR `remote_platform` LIKE ?)') .
            " ORDER BY `last_change` DESC LIMIT $query_limit";
 $params  = [1, $query_param, $query_param, $query_param];
 $results = dbFetchRows($sql, $params);
Index: html/includes/search/sensors.inc.php
===================================================================
--- html/includes/search/sensors.inc.php	(revision 13049)
+++ html/includes/search/sensors.inc.php	(working copy)
@@ -13,7 +13,7 @@
 /// SEARCH SENSORS
 $results = dbFetchRows("SELECT * FROM `sensors`
                         LEFT JOIN `devices` USING (`device_id`)" .
-                       generate_where_clause($GLOBALS['cache']['where']['device_permitted'], '`sensor_descr` LIKE ?') .
+                       generate_where_clause($GLOBALS['cache']['where']['devices_permitted'], '`sensor_descr` LIKE ?') .
                        " ORDER BY `sensor_descr` LIMIT $query_limit", [$query_param]);
 
 if (!safe_empty($results)) {
Index: html/includes/search/slas.inc.php
===================================================================
--- html/includes/search/slas.inc.php	(revision 13049)
+++ html/includes/search/slas.inc.php	(working copy)
@@ -12,7 +12,7 @@
 
 /// SEARCH SENSORS
 $results = dbFetchRows("SELECT * FROM `slas` LEFT JOIN `devices` USING (`device_id`)" .
-                       generate_where_clause($GLOBALS['cache']['where']['device_permitted'], '(`sla_target` LIKE ? OR `sla_index` LIKE ? OR `sla_tag` LIKE ?)') .
+                       generate_where_clause($GLOBALS['cache']['where']['devices_permitted'], '(`sla_target` LIKE ? OR `sla_index` LIKE ? OR `sla_tag` LIKE ?)') .
                        " ORDER BY `sla_target` LIMIT $query_limit", [$query_param, $query_param, $query_param]);
 
 if (!safe_empty($results)) {
@@ -40,4 +40,4 @@
     $search_results['slas'] = ['descr' => 'SLAs found', 'results' => $sla_search_results];
 }
 
-// EOF
\ No newline at end of file
+// EOF
Index: html/includes/search/status.inc.php
===================================================================
--- html/includes/search/status.inc.php	(revision 13049)
+++ html/includes/search/status.inc.php	(working copy)
@@ -13,7 +13,7 @@
 /// SEARCH STATUS
 $sql = "SELECT * FROM `status`
                         LEFT JOIN `devices` USING (`device_id`)" .
-       generate_where_clause($GLOBALS['cache']['where']['device_permitted'], '`status_descr` LIKE ?') .
+       generate_where_clause($GLOBALS['cache']['where']['devices_permitted'], '`status_descr` LIKE ?') .
        " ORDER BY `status_descr` LIMIT $query_limit";
 
 $results = dbFetchRows($sql, [$query_param]);

