Make spectrum optional

tags/0.2.13
Daniel Berteaud 11 years ago
parent 45bd7fca68
commit f26d208fcd
  1. 5
      root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/ejabberd.pm

@ -220,6 +220,7 @@ sub change_settings {
$rec = $db->get('spectrum');
if ($rec){
foreach my $proto (@transports){
if (grep ($proto, @gateways)){
$rec->set_prop("$proto",'enabled');
@ -228,6 +229,7 @@ sub change_settings {
$rec->set_prop("$proto",'disabled');
}
}
}
$rec = $ejdb->get('exception');
@ -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