diff --git a/plugins/admin/systems/class_serverService.inc b/plugins/admin/systems/class_serverService.inc
index 34b66573ed11e816a54f9bd020a90fdbc447cf78..57138cca822a692c1887f988ebdad9f2e9fb58f0 100644 (file)
/* Dispaly services overview */
$this->divList->execute();
$list = array();
+
foreach($this->plugins as $name => $obj){
if($obj->is_account){
- $list[$name] = $obj->getListEntry();
+ $list[$name] = $this->plugins[$name]->getListEntry();
}
}
$this->divList -> setEntries($list);
$this->plugins[$name]->$var = $this->$var;
}
}
- if($this->plugins[$name]->initially_was_account && $this->plugins[$name]->is_account){
- $this->plugins[$name]->setStatus($action);
+
+ /* check if services can be restarted */
+ $map =array(SERVICE_STARTED=> "AllowStart" ,
+ SERVICE_STOPPED => "AllowStop",
+ SERVICE_RESTARTED => "AllowRestart");
+
+ /* get plugins informations, restart/start/stop actions allowed ?*/
+ $tmp = $this->plugins[$name]->getListEntry();
+
+ /* Check if given action is allowed for this service */
+ if($tmp[$map[$action]]){
+ if($this->plugins[$name]->initially_was_account && $this->plugins[$name]->is_account){
+ $this->plugins[$name]->setStatus($action);
+ }
}
}
}else{