mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
services: bubble down plugins_services hook
This way, the caller only needs to specify plugins.inc on the top to let the subsystem(s) know plugin hooks need to be executed.
This commit is contained in:
parent
669f6e03eb
commit
e8fa56c5ac
@ -2736,6 +2736,13 @@ function services_get()
|
||||
'name' => 'configd',
|
||||
);
|
||||
|
||||
if (function_exists('plugins_services')) {
|
||||
/* only pull plugins if plugins.inc was included before */
|
||||
foreach (plugins_services() as $service) {
|
||||
$services[] = $service;
|
||||
}
|
||||
}
|
||||
|
||||
return $services;
|
||||
}
|
||||
|
||||
@ -2747,13 +2754,6 @@ function find_service_by_name($names, $filter = array())
|
||||
|
||||
$services = services_get();
|
||||
|
||||
if (function_exists('plugins_services')) {
|
||||
/* only pull plugins if plugins.inc was included before */
|
||||
foreach (plugins_services() as $service) {
|
||||
$services[] = $service;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($services as $service) {
|
||||
foreach ($names as $name) {
|
||||
if ($service['name'] != $name) {
|
||||
|
||||
@ -178,10 +178,6 @@ function service_control_restart($name, $extras)
|
||||
|
||||
$services = services_get();
|
||||
|
||||
foreach (plugins_services() as $service) {
|
||||
$services[] = $service;
|
||||
}
|
||||
|
||||
if (count($services) > 0) {
|
||||
uasort($services, "service_name_compare");
|
||||
}
|
||||
|
||||
@ -40,10 +40,6 @@ require_once("widgets/include/services_status.inc");
|
||||
|
||||
$services = services_get();
|
||||
|
||||
foreach (plugins_services() as $service) {
|
||||
$services[] = $service;
|
||||
}
|
||||
|
||||
if (isset($_POST['servicestatusfilter'])) {
|
||||
$config['widgets']['servicestatusfilter'] = htmlspecialchars($_POST['servicestatusfilter'], ENT_QUOTES | ENT_HTML401);
|
||||
write_config("Saved Service Status Filter via Dashboard");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user