Commit 8a9ea098 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) move some single used functions from unbound.inc

parent 5cae0a4d
...@@ -382,24 +382,6 @@ function sync_unbound_service() { ...@@ -382,24 +382,6 @@ function sync_unbound_service() {
} }
function unbound_acl_id_used($id) {
global $config;
if (is_array($config['unbound']['acls']))
foreach($config['unbound']['acls'] as & $acls)
if ($id == $acls['aclid'])
return true;
return false;
}
function unbound_get_next_id() {
$aclid = 0;
while(unbound_acl_id_used($aclid))
$aclid++;
return $aclid;
}
// Execute commands as the user unbound // Execute commands as the user unbound
function do_as_unbound_user($cmd) { function do_as_unbound_user($cmd) {
global $g; global $g;
......
...@@ -29,6 +29,26 @@ ...@@ -29,6 +29,26 @@
require_once("guiconfig.inc"); require_once("guiconfig.inc");
require_once("unbound.inc"); require_once("unbound.inc");
function unbound_acl_id_used($id) {
global $config;
if (is_array($config['unbound']['acls']))
foreach($config['unbound']['acls'] as & $acls)
if ($id == $acls['aclid'])
return true;
return false;
}
function unbound_get_next_id() {
$aclid = 0;
while(unbound_acl_id_used($aclid))
$aclid++;
return $aclid;
}
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_unbound_acls.php'); $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_unbound_acls.php');
if (!is_array($config['unbound']['acls'])) if (!is_array($config['unbound']['acls']))
......
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