allow the ability to rewrite locations

git-svn-id: http://www.observium.org/svn/observer/trunk@3180 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-05-14 12:55:19 +00:00
parent 4e8581c70f
commit aa91161d1a
3 changed files with 28 additions and 0 deletions
+16
View File
@@ -1,5 +1,21 @@
<?php
function rewrite_location($location){
// FIXME -- also check the database for rewrites?
global $config;
global $debug;
if(isset($config['location_map'][$location]))
{
$location = $config['location_map'][$location];
}
return $location;
}
function formatMac($mac)
{
$mac = preg_replace("/(..)(..)(..)(..)(..)(..)/", "\\1:\\2:\\3:\\4:\\5:\\6", $mac);