Fix how the HOSTALIAS and CONTACTALIAS macros work.

This commit is contained in:
Gunnar Beutner 2013-07-02 09:54:24 +02:00
parent 4cd4228f64
commit 184f503c2a
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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();