Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 74fca575

Von Sven Schöling vor etwa 13 Jahren hinzugefügt

  • ID 74fca575d438232002756175338c23f55b8a6c12
  • Vorgänger 4000444b
  • Nachfolger 45970e73

Fixes für das "my $var if $cond;" pattern.

Unterschiede anzeigen:

SL/Form.pm
2341 2341
    $key = $params;
2342 2342
  }
2343 2343

  
2344
  my $where = ' WHERE ' . join(' AND ', map { "($_)" } @where) if (@where);
2344
  my $where = @where ? ' WHERE ' . join(' AND ', map { "($_)" } @where) : '';
2345 2345

  
2346 2346
  my $query = qq|SELECT * FROM tax $where ORDER BY taxkey|;
2347 2347

  
......
2456 2456

  
2457 2457
  my $options        = ref $key eq 'HASH' ? $key : { key => $key };
2458 2458
  $options->{key}  ||= "all_customers";
2459
  my $limit_clause   = "LIMIT $options->{limit}" if $options->{limit};
2459
  my $limit_clause   = $options->{limit} ? "LIMIT $options->{limit}" : '';
2460 2460

  
2461 2461
  my @where;
2462 2462
  push @where, qq|business_id IN (SELECT id FROM business WHERE salesman)| if  $options->{business_is_salesman};
......
3665 3665
    $extension            = 'xls';
3666 3666
  }
3667 3667

  
3668
  my $printer_code    = '_' . $self->{printer_code} if $self->{printer_code};
3669
  my $email_extension = '_email' if -f "$self->{templates}/$self->{formname}_email${language}${printer_code}.${extension}";
3668
  my $printer_code    = $self->{printer_code} ? '_' . $self->{printer_code} : '';
3669
  my $email_extension = -f "$::myconfig{templates}/$self->{formname}_email${language}.${extension}" ? '_email' : '';
3670 3670
  $self->{IN}         = "$self->{formname}${email_extension}${language}${printer_code}.${extension}";
3671 3671

  
3672 3672
  # Format dates.

Auch abrufbar als: Unified diff