diff --git a/net/wol/Makefile b/net/wol/Makefile index 0d5c8e82c..583164443 100644 --- a/net/wol/Makefile +++ b/net/wol/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= wol PLUGIN_VERSION= 1.0 +PLUGIN_REVISION= 1 PLUGIN_DEPENDS= wol PLUGIN_COMMENT= Wake on LAN Service PLUGIN_MAINTAINER= franco@opnsense.org diff --git a/net/wol/src/www/services_wol.php b/net/wol/src/www/services_wol.php index 64e782089..a8d0b09b1 100644 --- a/net/wol/src/www/services_wol.php +++ b/net/wol/src/www/services_wol.php @@ -30,11 +30,7 @@ require_once("guiconfig.inc"); require_once("interfaces.inc"); -if (empty($config['wol']['wolentry']) || !is_array($config['wol']['wolentry'])) { - $config['wol'] = array(); - $config['wol']['wolentry'] = array(); -} -$a_wol = &$config['wol']['wolentry']; +$a_wol = &config_read_array('wol', 'wolentry'); if ($_SERVER['REQUEST_METHOD'] === 'POST') { diff --git a/net/wol/src/www/services_wol_edit.php b/net/wol/src/www/services_wol_edit.php index a3cfa93b6..6394099f5 100644 --- a/net/wol/src/www/services_wol_edit.php +++ b/net/wol/src/www/services_wol_edit.php @@ -35,11 +35,7 @@ function wolcmp($a, $b) { } -if (empty($config['wol']['wolentry']) || !is_array($config['wol']['wolentry'])) { - $config['wol'] = array(); - $config['wol']['wolentry'] = array(); -} -$a_wol = &$config['wol']['wolentry']; +$a_wol = &config_read_array('wol', 'wolentry'); if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (isset($_GET['id']) && !empty($a_wol[$_GET['id']])) {