small panels cleanup

tags/ipasserelle-base-0.2.65-1
Daniel Berteaud 13 years ago
parent d95669e6e6
commit c2547531f2
  1. 21
      root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/userinfo.pm
  2. 4
      root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/userpanelViewgroups.pm

@ -62,8 +62,7 @@ sub print_user_table {
my @users = $accountdb->get('admin');
push @users, $accountdb->users();
unless ( scalar @users )
{
unless ( scalar @users ) {
print $q->Tr($q->td($self->localise('NO_USER_ACCOUNTS')));
return "";
}
@ -125,8 +124,7 @@ sub modify_user {
my $acct = $accountdb->get($acctName);
my $acctType = $acct->prop('type');
if ($acctType eq "user" || $acctName eq 'admin')
{
if ($acctType eq "user" || $acctName eq 'admin') {
$accountdb->remove_user_auto_pseudonyms($acctName);
my %newProperties = (
'FirstName' => $self->{cgi}->param('FirstName'),
@ -193,26 +191,21 @@ sub pseudonym_clash {
my $da = $dp->prop('Account') if $dp;
my $ua = $up->prop('Account') if $up;
if ($dp and $da and $da ne $acctName)
{
return $self->localise('PSEUDONYM_CLASH',
{
if ($dp and $da and $da ne $acctName) {
return $self->localise('PSEUDONYM_CLASH', {
acctName => $acctName,
clashName => $da,
pseudonym => $dp->key
});
}
elsif ($up and $ua and $ua ne $acctName)
{
return $self->localise('PSEUDONYM_CLASH',
{
elsif ($up and $ua and $ua ne $acctName) {
return $self->localise('PSEUDONYM_CLASH', {
acctName => $acctName,
clashName => $ua,
pseudonym => $up->key
});
}
else
{
else {
return "OK";
}
}

@ -14,7 +14,6 @@ use Carp;
our @ISA = qw(esmith::FormMagick Exporter);
our @EXPORT = qw(
show_initial
genUsers
get_accounts_prop
@ -72,7 +71,7 @@ sub get_description {
=head2 get_group_mail
Get the mail address for the group named in the CGI argument "GroupName"
Get the mail address for the group named in the CGI argument "groupName"
=cut
@ -189,3 +188,4 @@ sub genUsers () {
return $out;
}
1;

Loading…
Cancel
Save