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() {
}
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
function do_as_unbound_user($cmd) {
global $g;
......
......@@ -29,6 +29,26 @@
require_once("guiconfig.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');
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