From 954e1105ecff719baca11490b3f328a14fcea9a0 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 24 Apr 2012 11:52:38 +0200 Subject: [PATCH] Kosmetik: Codevereinfachung --- bin/mozilla/io.pl | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index c44b525a2..fa46e646b 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1506,14 +1506,7 @@ sub print_form { push @template_files, "$form->{formname}.$extension"; push @template_files, "default.$extension"; @template_files = uniq @template_files; - - $form->{IN} = undef; - for my $filename (@template_files) { - if (-f "$myconfig{templates}/$filename") { - $form->{IN} = $filename; - last; - } - } + $form->{IN} = first { -f "$myconfig{templates}/$_" } @template_files; if (!defined $form->{IN}) { $::form->error($::locale->text('Cannot find matching template for this print request. Please contact your template maintainer. I tried these: #1.', join ', ', map { "'$_'"} @template_files)); -- 2.20.1