diff --git a/plugins/admin/systems/class_goNtpServer.inc b/plugins/admin/systems/class_goNtpServer.inc
index 21bab42762ab4def6e20dde441f7dab6632511a2..dbfc1401dd323b3fb2673d3cf160651526484451 100644 (file)
var $goTimeSource = array();
var $goNtpServerStatus= "";
var $acl;
-
+ var $cn = "";
function goNtpServer($config,$dn)
{
foreach ($add_attrs as $name => $value){
$command= preg_replace("/%$name/", $value, $command);
}
+
+ /* If there are still some %.. in our command, try to fill these with some other class vars */
+ if(preg_match("/%/",$command)){
+ $attrs = get_object_vars($this);
+ foreach($attrs as $name => $value){
+ if(!is_string($value)) continue;
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ }
+
if (check_command($command)){
@DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
$command, "Execute");