diff options
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r-- | etc/inc/util.inc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index ea18345..d71c512 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -851,6 +851,22 @@ function alias_expand($name) { return null; } +function alias_expand_urltable($name) { + global $config; + $urltable_prefix = "/var/db/aliastables/"; + $urltable_filename = $urltable_prefix . $name . ".txt"; + + foreach ($config['aliases']['alias'] as $alias) { + if (($alias['type'] == 'urltable') && ($alias['name'] == $name)) { + if (is_URL($alias["url"]) && file_exists($urltable_filename)) + return $urltable_filename; + else if (process_alias_urltable($name, $alias["url"], 0, true)) + return $urltable_filename; + } + } + return null; +} + /* find out whether two subnets overlap */ function check_subnets_overlap($subnet1, $bits1, $subnet2, $bits2) { |