2010-05-26 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DB.pm: Added a function to get the id of a user profile (needed by pandora_manage.pl). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2803 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d5444b6ebf
commit
75029b612a
|
@ -1,3 +1,8 @@
|
||||||
|
2010-05-26 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/DB.pm: Added a function to get the id of a user
|
||||||
|
profile (needed by pandora_manage.pl).
|
||||||
|
|
||||||
2010-05-25 Ramon Novoa <rnovoa@artica.es>
|
2010-05-25 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* lib/PandoraFMS/DB.pm: Added a function to get the id of an action
|
* lib/PandoraFMS/DB.pm: Added a function to get the id of an action
|
||||||
|
|
|
@ -44,6 +44,7 @@ our @EXPORT = qw(
|
||||||
get_module_name
|
get_module_name
|
||||||
get_nc_profile_name
|
get_nc_profile_name
|
||||||
get_os_id
|
get_os_id
|
||||||
|
get_profile_id
|
||||||
get_server_id
|
get_server_id
|
||||||
get_template_id
|
get_template_id
|
||||||
get_template_module_id
|
get_template_module_id
|
||||||
|
@ -210,6 +211,16 @@ sub get_nc_profile_name ($$) {
|
||||||
return get_db_value ($dbh, "SELECT * FROM tnetwork_profile WHERE id_np = ?", $nc_id);
|
return get_db_value ($dbh, "SELECT * FROM tnetwork_profile WHERE id_np = ?", $nc_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
## Return profile ID given the profile name.
|
||||||
|
##########################################################################
|
||||||
|
sub get_profile_id ($$) {
|
||||||
|
my ($dbh, $profile_name) = @_;
|
||||||
|
|
||||||
|
my $rc = get_db_value ($dbh, "SELECT id_perfil FROM tperfil WHERE name = ?", $profile_name);
|
||||||
|
return defined ($rc) ? $rc : -1;
|
||||||
|
}
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
## Return a group's name given its ID.
|
## Return a group's name given its ID.
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
Loading…
Reference in New Issue