Make spectrum optional

tags/ipasserelle-im-0.2.18-1
Daniel Berteaud 11 years ago
parent 7ab894da39
commit 20117a5ae2
  1. 17
      root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/ejabberd.pm

@ -220,12 +220,14 @@ sub change_settings {
$rec = $db->get('spectrum');
foreach my $proto (@transports){
if (grep ($proto, @gateways)){
$rec->set_prop("$proto",'enabled');
}
else{
$rec->set_prop("$proto",'disabled');
if ($rec){
foreach my $proto (@transports){
if (grep ($proto, @gateways)){
$rec->set_prop("$proto",'enabled');
}
else{
$rec->set_prop("$proto",'disabled');
}
}
}
@ -266,6 +268,8 @@ sub print_gateways
my ($self) = @_;
my $q = $self->{cgi};
my $spectrum = $db->get('spectrum') || return undef;
print "<tr><td class=\"sme-noborders-label\">",
$self->localise('LABEL_GATEWAYS'),
"</td><td>\n";
@ -275,7 +279,6 @@ sub print_gateways
esmith::cgi::genSmallCell($q, $self->localise('PROTOCOL'),"header"),
esmith::cgi::genSmallCell($q, $self->localise('STATUS'),"header"),
);
my $spectrum = $db->get('spectrum');
foreach my $proto (@transports){
my $status = $spectrum->prop($proto) || 'disabled';

Loading…
Cancel
Save