Subversion Repositories ALCASAR

Rev

Rev 1805 | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
1805 clement.si 1
<?php
2
function xlat($filter,$login,$config)
3
{
4
	$string = $filter;
5
	if ($filter != ''){
6
		$string = preg_replace('/%u/',$login,$string);
2488 lucas.echa 7
		$string = preg_replace('/%U/',$_SERVER["REMOTE_USER"],$string);
1805 clement.si 8
		$string = preg_replace('/%ma/',$mappings[$http_user]['accounting'],$string);
9
		$string = preg_replace('/%mu/',$mappings[$http_user]['userdb'],$string);
10
		$string = preg_replace('/%mn/',$mappings[$http_user]['nasdb'],$string);
11
		$string = preg_replace('/%mN/',$mappings[$http_user]['nasadmin'],$string);
12
	}
13
 
14
	return $string;
15
}
16
?>