mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 09:14:09 +02:00
Return data list name
Return the data list name instead of the id for the function getDatalistName(). refs #621
This commit is contained in:
parent
592b8cb98e
commit
fd53224a58
@ -65,8 +65,17 @@ class PropertyModifierMap extends PropertyModifierHook
|
|||||||
|
|
||||||
protected function getDatalistName()
|
protected function getDatalistName()
|
||||||
{
|
{
|
||||||
// TODO: need the db for ->enumDatalist()
|
$db = $this->getDb()->getDbAdapter();
|
||||||
return sprintf('List with id %s', $this->getSetting('datalist'));
|
$query = $db->select()->from(
|
||||||
|
'director_datalist',
|
||||||
|
'list_name'
|
||||||
|
)->where(
|
||||||
|
'id = ?',
|
||||||
|
$this->getSetting('datalist_id')
|
||||||
|
);
|
||||||
|
$result = $db->fetchOne($query);
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function loadCache($force = false)
|
protected function loadCache($force = false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user