Fix escaping of server name.

This commit is contained in:
Michal Čihař
2009-04-10 07:29:13 +00:00
parent 5878e714c5
commit 1325e23873

View File

@@ -287,7 +287,7 @@ class ConfigFile
$ret .= "/* Servers configuration */$crlf\$i = 0;" . $crlf . $crlf; $ret .= "/* Servers configuration */$crlf\$i = 0;" . $crlf . $crlf;
foreach ($c['Servers'] as $id => $server) { foreach ($c['Servers'] as $id => $server) {
$k = preg_replace('/[^A-Za-z0-9_]/', '_', $k); $k = preg_replace('/[^A-Za-z0-9_]/', '_', $k);
$ret .= '/* Server: ' . $this->getServerName($id) . " [$id] */" . $crlf $ret .= '/* Server: ' . strtr($this->getServerName($id), '*/', '-') . " [$id] */" . $crlf
. '$i++;' . $crlf; . '$i++;' . $crlf;
foreach ($server as $k => $v) { foreach ($server as $k => $v) {
$ret .= "\$cfg['Servers'][\$i]['$k'] = " $ret .= "\$cfg['Servers'][\$i]['$k'] = "