Bug 20596: (QA follow-up) perltidy
authorFridolin Somers <fridolin.somers@biblibre.com>
Thu, 15 Dec 2022 06:31:53 +0000 (20:31 -1000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 15 Dec 2022 14:05:30 +0000 (14:05 +0000)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa13c1a9d1fe44021f991fc8e78f70e80b2a56ac)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/AuthoritiesMarc.pm

index 10d4342..0a2a736 100644 (file)
@@ -206,18 +206,18 @@ sub SearchAuthorities {
         }    #if value
     }
     ##Add how many queries generated
-    if (defined $query && $query=~/\S+/){
+    if ( defined $query && $query =~ /\S+/ ) {
         #NOTE: This code path is used by authority search in cataloguing plugins...
         #FIXME: This does not quite work the way the author probably intended.
         #It creates a ($query prefix) AND (query 1) AND (query 2) structure instead of
         #($query prefix) AND (query 1 AND query 2)
-      $query= $and x $attr_cnt . $query . (defined $q2 ? $q2 : '');
+        $query = $and x $attr_cnt . $query . ( defined $q2 ? $q2 : '' );
     } else {
         #NOTE: This code path is used by authority search in authority home and record matching rules...
         my $op_prefix = '';
         #NOTE: Without the following code, multiple queries will never be joined together
         #with a Boolean operator.
-        if ($attr_cnt > 1){
+        if ( $attr_cnt > 1 ) {
             #NOTE: We always need 1 less operator than we have operands,
             #so long as there is more than 1 operand
             my $or_cnt = $attr_cnt - 1;
@@ -225,7 +225,7 @@ sub SearchAuthorities {
             $op_prefix = ' @or ' x $or_cnt;
             #NOTE: This evaluates to a logical structure like (query 1) OR (query 2) OR (query 3)
         }
-      $query= $op_prefix . $q2;
+        $query = $op_prefix . $q2;
     }
     ## Adding order
     #$query=' @or  @attr 7=2 @attr 1=Heading 0 @or  @attr 7=1 @attr 1=Heading 1'.$query if ($sortby eq "HeadingDsc");