fix indentation
This commit is contained in:
parent
d0e9dc8d59
commit
ee87f3bbb8
bureau/class
|
@ -1,25 +1,24 @@
|
||||||
<?php
|
<?php
|
||||||
/* Read global variables (AlternC configuration) */
|
|
||||||
|
|
||||||
|
/* Read global variables (AlternC configuration) */
|
||||||
$L_VERSION="v. @@REPLACED_DURING_BUILD@@";
|
$L_VERSION="v. @@REPLACED_DURING_BUILD@@";
|
||||||
|
|
||||||
/* To ease the transition, we define a lookup table for old names */
|
/* To ease the transition, we define a lookup table for old names */
|
||||||
$compat = array('DEFAULT_MX' => 'MX',
|
$compat = array('DEFAULT_MX' => 'MX',
|
||||||
'MYSQL_USER' => 'MYSQL_LOGIN',
|
'MYSQL_USER' => 'MYSQL_LOGIN',
|
||||||
'MYSQL_PASS' => 'MYSQL_PWD',
|
'MYSQL_PASS' => 'MYSQL_PWD',
|
||||||
'NS1_HOSTNAME' => 'NS1',
|
'NS1_HOSTNAME' => 'NS1',
|
||||||
'NS2_HOSTNAME' => 'NS2'
|
'NS2_HOSTNAME' => 'NS2');
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
$config_file = fopen('/etc/alternc/local.sh', 'r');
|
$config_file = fopen('/etc/alternc/local.sh', 'r');
|
||||||
while (FALSE !== ($line = fgets($config_file))) {
|
while (FALSE !== ($line = fgets($config_file))) {
|
||||||
if (ereg('^([A-Z0-9_]*)="([^"]*)"', $line, $regs)) {
|
if (ereg('^([A-Z0-9_]*)="([^"]*)"', $line, $regs)) {
|
||||||
$GLOBALS['L_'.$regs[1]] = $regs[2];
|
$GLOBALS['L_'.$regs[1]] = $regs[2];
|
||||||
if (isset($compat[$regs[1]])) {
|
if (isset($compat[$regs[1]])) {
|
||||||
$GLOBALS['L_'.$compat[$regs[1]]] = $regs[2];
|
$GLOBALS['L_'.$compat[$regs[1]]] = $regs[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose($config_file);
|
fclose($config_file);
|
||||||
?>
|
|
||||||
|
|
Loading…
Reference in New Issue