Commit ec4ca735 authored by Franco Fichtner's avatar Franco Fichtner

services: s/get_services/services_get/g

(cherry picked from commit 45d45596)
parent d6f0e34e
...@@ -2545,8 +2545,7 @@ function is_apinger_enabled() ...@@ -2545,8 +2545,7 @@ function is_apinger_enabled()
return is_array(return_gateways_array()); return is_array(return_gateways_array());
} }
function services_get()
function get_services()
{ {
global $config; global $config;
...@@ -2702,9 +2701,9 @@ function get_services() ...@@ -2702,9 +2701,9 @@ function get_services()
return $services; return $services;
} }
function find_service_by_openvpn_vpnid($vpnid)
function find_service_by_openvpn_vpnid($vpnid) { {
$services = get_services(); $services = services_get();
foreach ($services as $service) { foreach ($services as $service) {
if (($service["name"] == "openvpn") && isset($service["vpnid"]) && ($service["vpnid"] == $vpnid)) { if (($service["name"] == "openvpn") && isset($service["vpnid"]) && ($service["vpnid"] == $vpnid)) {
return $service; return $service;
......
...@@ -35,7 +35,7 @@ function find_service_by_name($names) ...@@ -35,7 +35,7 @@ function find_service_by_name($names)
$names = array($names); $names = array($names);
} }
$services = get_services(); $services = services_get();
foreach ($services as $service) { foreach ($services as $service) {
foreach ($names as $name) { foreach ($names as $name) {
......
...@@ -291,7 +291,7 @@ function service_control_restart($name, $extras) { ...@@ -291,7 +291,7 @@ function service_control_restart($name, $extras) {
return sprintf(gettext("%s has been restarted."),htmlspecialchars($name)); return sprintf(gettext("%s has been restarted."),htmlspecialchars($name));
} }
$services = get_services(); $services = services_get();
if (count($services) > 0) { if (count($services) > 0) {
uasort($services, "service_name_compare"); uasort($services, "service_name_compare");
......
...@@ -37,7 +37,7 @@ require_once("vpn.inc"); ...@@ -37,7 +37,7 @@ require_once("vpn.inc");
require_once("widgets/include/services_status.inc"); require_once("widgets/include/services_status.inc");
require_once("interfaces.inc"); require_once("interfaces.inc");
$services = get_services(); $services = services_get();
if (isset($_POST['servicestatusfilter'])) { if (isset($_POST['servicestatusfilter'])) {
$config['widgets']['servicestatusfilter'] = htmlspecialchars($_POST['servicestatusfilter'], ENT_QUOTES | ENT_HTML401); $config['widgets']['servicestatusfilter'] = htmlspecialchars($_POST['servicestatusfilter'], ENT_QUOTES | ENT_HTML401);
......
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