Commit 2456f162 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5949-systems-dashboard-crash-on-1-4-dev' into '1.4-dev'

Resolve "Systems dashboard crash on 1.4-dev"

See merge request fusiondirectory/fd-plugins!531
parents f77745c0 ee2e706d
...@@ -146,7 +146,7 @@ class dashboardSystems extends simplePlugin ...@@ -146,7 +146,7 @@ class dashboardSystems extends simplePlugin
foreach (['cn','ipHostNumber','argonautProtocol','argonautPort'] as $key) { foreach (['cn','ipHostNumber','argonautProtocol','argonautPort'] as $key) {
$argonaut_server[$key] = $attrs[$key][0]; $argonaut_server[$key] = $attrs[$key][0];
} }
$argonaut_server['link'] = objects::link(key($argonaut_servers), 'server', 'service_serviceArgonaut', $attrs); $argonaut_server['link'] = objects::link(key($argonaut_servers), 'server', 'service_argonautServer', $attrs);
} }
if (strpos($ui->get_permissions($config->current['BASE'], 'server/argonautClient', ''), 'r') === FALSE) { if (strpos($ui->get_permissions($config->current['BASE'], 'server/argonautClient', ''), 'r') === FALSE) {
......
...@@ -70,6 +70,7 @@ class servicesManagement extends management implements SimpleTab ...@@ -70,6 +70,7 @@ class servicesManagement extends management implements SimpleTab
'plIcon' => '', 'plIcon' => '',
'plObjectType' => ['server'], 'plObjectType' => ['server'],
'plPrority' => 5, 'plPrority' => 5,
'plSubTabs' => 'SERVERSERVICE',
'plProvidedAcls' => [] 'plProvidedAcls' => []
]; ];
...@@ -263,6 +264,9 @@ class servicesManagement extends management implements SimpleTab ...@@ -263,6 +264,9 @@ class servicesManagement extends management implements SimpleTab
function editEntry (array $action) function editEntry (array $action)
{ {
$s_entry = array_pop($action['targets']); $s_entry = array_pop($action['targets']);
if (!isset($this->plugins[$s_entry])) {
throw new FusionDirectoryException('No service "'.$s_entry.'" in '.json_encode(array_keys($this->plugins)));
}
if ($this->plugins[$s_entry]->acl_is_readable('')) { if ($this->plugins[$s_entry]->acl_is_readable('')) {
$this->backup = get_object_vars($this->plugins[$s_entry]); $this->backup = get_object_vars($this->plugins[$s_entry]);
$this->dialogObject = $this->plugins[$s_entry]; $this->dialogObject = $this->plugins[$s_entry];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment