# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2005 Craig Barratt
+# Copyright (C) 2005-2007 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 3.0.0, released 28 Jan 2007.
+# Version 3.1.0beta0, released 3 Sep 2007.
#
# See http://backuppc.sourceforge.net.
#
{name => "Bzip2Path"},
{text => "CfgEdit_Title_Install_Paths"},
- {name => "TopDir"},
- {name => "ConfDir"},
- {name => "LogDir"},
+ #
+ # Can only edit TopDir and LogDir if we are in FHS mode.
+ # Otherwise they are hardcoded in lib/BackupPC/Lib.pm.
+ #
+ {name => "TopDir",
+ visible => sub { return $_[1]->useFHS(); } },
+ {name => "LogDir",
+ visible => sub { return $_[1]->useFHS(); } },
{name => "CgiDir"},
- {name => "InstallDir"},
+ #
+ # Cannot edit ConfDir or InstallDir, since the real value is hardcoded in
+ # lib/BackupPC/Lib.pm.
+ # {name => "ConfDir"},
+ # {name => "InstallDir"},
+ #
],
},
email => {
{name => "XferMethod", onchangeSubmit => 1},
{name => "XferLogLevel"},
{name => "ClientCharset"},
+ {name => "ClientCharsetLegacy"},
{text => "CfgEdit_Title_Smb_Settings",
visible => sub { return $_[0]->{XferMethod} eq "smb"; } },
($mesg, my $hostChange) = hostsDiffMesg($hostsNew);
$bpc->HostInfoWrite($hostsNew) if ( $hostChange );
foreach my $host ( keys(%$copyConf) ) {
- my $confData = $bpc->ConfigDataRead($copyConf->{$host});
+ #
+ # Currently host names are forced to lc when they
+ # are read from the hosts file. Therefore we need
+ # to force the from and to hosts to lc.
+ #
+ my $confData = $bpc->ConfigDataRead(lc($copyConf->{$host}));
my $fromHost = $copyConf->{$host};
- $err .= $bpc->ConfigDataWrite($host, $confData);
+ $err .= $bpc->ConfigDataWrite(lc($host), $confData);
$mesg .= eval("qq($Lang->{CfgEdit_Log_Copy_host_config})");
}
next if ( $disabled || $menuDisable{$menu}{top} );
if ( ref($paramInfo->{visible}) eq "CODE"
- && !&{$paramInfo->{visible}}($newConf) ) {
+ && !&{$paramInfo->{visible}}($newConf, $bpc) ) {
next;
}