mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
CS filtering and constant
This commit is contained in:
parent
18d8f90f90
commit
07edee619a
@ -602,6 +602,7 @@ define('DISCOVERY_SCRIPT_IPAM_RECON', 3);
|
|||||||
define('DISCOVERY_SCRIPT_IPMI_RECON', 4);
|
define('DISCOVERY_SCRIPT_IPMI_RECON', 4);
|
||||||
|
|
||||||
// Discovery task descriptions.
|
// Discovery task descriptions.
|
||||||
|
define('CLOUDWIZARD_AZURE_DESCRIPTION', 'Discovery.Cloud.Azure.Compute');
|
||||||
define('CLOUDWIZARD_AWS_DESCRIPTION', 'Discovery.Cloud.AWS.EC2');
|
define('CLOUDWIZARD_AWS_DESCRIPTION', 'Discovery.Cloud.AWS.EC2');
|
||||||
define('CLOUDWIZARD_VMWARE_DESCRIPTION', 'Discovery.App.VMware');
|
define('CLOUDWIZARD_VMWARE_DESCRIPTION', 'Discovery.App.VMware');
|
||||||
|
|
||||||
|
@ -72,6 +72,10 @@ function credentials_get_all(
|
|||||||
throw new Exception('[credential_get_all] Fields must be an array or "count".');
|
throw new Exception('[credential_get_all] Fields must be an array or "count".');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($filter['product']) && !empty($filter['product'])) {
|
||||||
|
$sql_filters[] = sprintf(' AND cs.product = "%s"', $filter['product']);
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($filter['free_search']) && !empty($filter['free_search'])) {
|
if (isset($filter['free_search']) && !empty($filter['free_search'])) {
|
||||||
$sql_filters[] = vsprintf(
|
$sql_filters[] = vsprintf(
|
||||||
' AND (lower(cs.username) like lower("%%%s%%")
|
' AND (lower(cs.username) like lower("%%%s%%")
|
||||||
@ -163,7 +167,7 @@ function credentials_get_all(
|
|||||||
%s
|
%s
|
||||||
%s',
|
%s',
|
||||||
join(',', $fields),
|
join(',', $fields),
|
||||||
join(',', $sql_filters),
|
join(' ', $sql_filters),
|
||||||
$order_by,
|
$order_by,
|
||||||
$pagination
|
$pagination
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user