Commit 07a634bf authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '5980-management-should-be-a-bit-more-flexible' into '1.4-dev'

Resolve "Management should be a bit more flexible"

See merge request fusiondirectory/fd!578
parents 4cc66e3a 212dba8a
......@@ -34,13 +34,13 @@ class simpleService extends simplePlugin
/*! \brief constructor
*
* \param string $dn The dn of this instance
* \param Object $parent The serverService instance
* \param Object $parent The servicesManagement instance
* \param array $attributesInfo An attributesInfo array, if NULL, getAttributesInfo will be used.
*
*/
function __construct ($dn = NULL, $parent = NULL, $attributesInfo = NULL)
{
/* $parent is the instance of serverService in this case, we set it as parent */
/* $parent is the instance of servicesManagement in this case, we set it as parent */
parent::__construct($dn, $parent, $parent, FALSE, $attributesInfo);
$plInfos = pluglist::pluginInfos(get_class($this));
$this->DisplayName = $plInfos['plShortName'];
......@@ -67,7 +67,7 @@ class simpleService extends simplePlugin
return FALSE;
}
/*! \brief Get service information for serverService plugin */
/*! \brief Get service information for servicesManagement plugin */
function getListEntry ()
{
/* Assign status flag */
......
......@@ -543,8 +543,8 @@ class simpleTabs
{
if (isset($this->by_object[$tab]) && ($this->by_object[$tab]->is_account || $this->by_object[$tab]->ignore_account)) {
return $this->by_object[$tab];
} elseif (is_subclass_of($tab, 'simpleService') && isset($this->by_object['ServerService']->plugins[$tab]) && $this->by_object['ServerService']->plugins[$tab]->is_account) {
return $this->by_object['ServerService']->plugins[$tab];
} elseif (is_subclass_of($tab, 'simpleService') && isset($this->by_object['servicesManagement']->plugins[$tab]) && $this->by_object['servicesManagement']->plugins[$tab]->is_account) {
return $this->by_object['servicesManagement']->plugins[$tab];
} else {
return FALSE;
}
......
Markdown is supported
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