Bug 7688 follow-up: Small fixes for QA
authorJulian Maurice <julian.maurice@biblibre.com>
Thu, 2 Aug 2012 14:55:24 +0000 (16:55 +0200)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 23 Mar 2013 02:14:35 +0000 (22:14 -0400)
- # Subroutines::ProhibitExplicitReturnUndef: Got 1 violation(s) in
  C4::Serials::GetSubscriptionIrregularities
- Bad template constructions fixed in serials/subscription-add.tt

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/Serials.pm
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt

index 3cbd042..5676883 100644 (file)
@@ -1335,7 +1335,7 @@ get the list of irregularities for a subscription
 sub GetSubscriptionIrregularities {
     my $subscriptionid = shift;
 
-    return undef unless $subscriptionid;
+    return unless $subscriptionid;
 
     my $dbh = C4::Context->dbh;
     my $query = qq{
index 30e8627..79fd2af 100644 (file)
@@ -653,7 +653,11 @@ $(document).ready(function() {
                                         <select name="frequency" size="1" id="frequency">
                                             <option value="">-- please choose --</option>
                                             [% FOREACH frequency IN frequencies %]
-                                                <option value="[% frequency.id %]" [% IF (frequency.selected) %] selected="selected" [% END %]>
+                                                [% IF (frequency.selected) %]
+                                                    <option value="[% frequency.id %]" selected="selected">
+                                                [% ELSE %]
+                                                    <option value="[% frequency.id %]">
+                                                [% END %]
                                                     [% frequency.label %]
                                                 </option>
                                             [% END %]
@@ -663,7 +667,11 @@ $(document).ready(function() {
                                         <label for="subtype">Subscription length:</label>
                                         <select name="subtype" id="subtype">
                                             [% FOREACH subt IN subtype %]
-                                                <option value="[% subt.name %]" [% IF (subt.selected) %] selected="selected" [% END %] >
+                                                [% IF (subt.selected) %]
+                                                    <option value="[% subt.name %]" selected="selected">
+                                                [% ELSE %]
+                                                    <option value="[% subt.name %]">
+                                                [% END %]
                                                     [% subt.name %]
                                                 </option>
                                             [% END %]
@@ -684,7 +692,13 @@ $(document).ready(function() {
                                         <select name="numbering_pattern" size="1" id="numberpattern">
                                             <option value="">-- please choose --</option>
                                             [% FOREACH numberpattern IN numberpatterns %]
-                                                <option value="[% numberpattern.id %]" [% IF (numberpattern.selected) %] selected="selected" [% END %]>[% numberpattern.label %]</option>
+                                                [% IF (numberpattern.selected) %]
+                                                    <option value="[% numberpattern.id %]">
+                                                [% ELSE %]
+                                                    <option value="[% numberpattern.id %]">
+                                                [% END %]
+                                                    [% numberpattern.label %]
+                                                </option>
                                             [% END %]
                                         </select>
                                     </li>