mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Fix how the HOSTALIAS and CONTACTALIAS macros work.
This commit is contained in:
parent
4cd4228f64
commit
184f503c2a
@ -541,11 +541,11 @@ String Host::StateToString(HostState state)
|
||||
|
||||
bool Host::ResolveMacro(const String& macro, const Dictionary::Ptr&, String *result) const
|
||||
{
|
||||
if (macro == "HOSTNAME" || macro == "HOSTALIAS") {
|
||||
if (macro == "HOSTNAME") {
|
||||
*result = GetName();
|
||||
return true;
|
||||
}
|
||||
else if (macro == "HOSTDISPLAYNAME") {
|
||||
else if (macro == "HOSTDISPLAYNAME" || macro == "HOSTALIAS") {
|
||||
*result = GetDisplayName();
|
||||
return true;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ bool User::ResolveMacro(const String& macro, const Dictionary::Ptr& cr, String *
|
||||
*result = GetName();
|
||||
return true;
|
||||
} else if (macro == "CONTACTALIAS") {
|
||||
*result = GetName();
|
||||
*result = GetDisplayName();
|
||||
return true;
|
||||
} else {
|
||||
Dictionary::Ptr macros = GetMacros();
|
||||
|
Loading…
x
Reference in New Issue
Block a user