Bug 10271: (follow-up) correct tabs
[koha_fer] / cataloguing / value_builder / marc21_linking_section.pl
index f317f8b..ac7cfce 100644 (file)
@@ -190,7 +190,15 @@ sub plugin {
            my $startfrom      = $query->param('startfrom');
                my $resultsperpage = $query->param('resultsperpage') || 20;
             my $orderby;
-           $search = 'kw,wrdl=' . $search . ' and mc-itemtype=' . $itype if $itype;
+            my $QParser;
+            $QParser = C4::Context->queryparser if (C4::Context->preference('UseQueryParser'));
+            my $op;
+            if ($QParser) {
+                $op = '&&';
+            } else {
+                $op = 'and';
+            }
+           $search = 'kw:' . $search . " $op mc-itemtype:" . $itype if $itype;
                my ( $errors, $results, $total_hits ) =
                   SimpleSearch( $search, $startfrom * $resultsperpage,
                  $resultsperpage );
@@ -348,25 +356,7 @@ sub plugin {
          );
              $sth->finish;
 
-         my @branchloop;
-                my @select_branch;
-             my %select_branches;
-           my $branches = GetBranches;
-            push @select_branch, "";
-               $select_branches{''} = "";
-             foreach my $thisbranch ( keys %$branches ) {
-                   push @select_branch, $branches->{$thisbranch}->{'branchcode'};
-                 $select_branches{ $branches->{$thisbranch}->{'branchcode'} } =
-                   $branches->{$thisbranch}->{'branchname'};
-            }
-              my $CGIbranch = CGI::scrolling_list(
-                   -name     => 'value',
-                  -values   => \@select_branch,
-                  -labels   => \%select_branches,
-                        -size     => 1,
-                        -multiple => 0
-         );
-             $sth->finish;
+         # To show list of branches please use GetBranchesLoop() and modify template
 
          my $req = $dbh->prepare(
 "select distinctrow left(publishercode,45) from biblioitems order by publishercode"
@@ -396,7 +386,6 @@ sub plugin {
 
             $template->param(    #classlist => $classlist,
                  CGIitemtype  => $CGIitemtype,
-                  CGIbranch    => $CGIbranch,
                     CGIPublisher => $CGIpublisher,
                  itypeloop    => \@itemtypes,
                    index        => $query->param('index'),