Bug 24735: Remove QueryParser-related code
[koha.git] / labels / label-item-search.pl
index 5b20224..fdade75 100755 (executable)
@@ -67,8 +67,6 @@ my $display_columns = [ {_add                   => {label => "Add Item", link_fi
                       ];
 
 if ( $op eq "do_search" ) {
-    my $QParser;
-    $QParser = C4::Context->queryparser if (C4::Context->preference('UseQueryParser'));
     $idx         = $query->param('idx');
     $ccl_textbox = $query->param('ccl_textbox');
     if ( $ccl_textbox && $idx ) {
@@ -82,14 +80,8 @@ if ( $op eq "do_search" ) {
         $datefrom = eval { dt_from_string ( $datefrom ) };
         if ($datefrom) {
             $datefrom = output_pref( { dt => $datefrom, dateonly => 1, dateformat => 'iso' } );
-            if ($QParser) {
-                $ccl_query .= ' && ' if $ccl_textbox;
-                $ccl_query .=
-                    "acqdate(" . $datefrom . '-)';
-            } else {
-                $ccl_query .= ' and ' if $ccl_textbox;
-                $ccl_query .= "acqdate,ge,st-date-normalized=" . $datefrom;
-            }
+            $ccl_query .= ' and ' if $ccl_textbox;
+            $ccl_query .= "acqdate,ge,st-date-normalized=" . $datefrom;
         }
     }
 
@@ -97,13 +89,8 @@ if ( $op eq "do_search" ) {
         $dateto = eval { dt_from_string ( $dateto ) };
         if ($dateto) {
            $dateto = output_pref( { dt => $dateto, dateonly => 1, dateformat => 'iso' } );
-            if ($QParser) {
-                $ccl_query .= ' && ' if ( $ccl_textbox || $datefrom );
-                $ccl_query .= "acqdate(-" . $dateto . ')';
-            } else {
-                $ccl_query .= ' and ' if ( $ccl_textbox || $datefrom );
-                $ccl_query .= "acqdate,le,st-date-normalized=" . $dateto;
-            }
+            $ccl_query .= ' and ' if ( $ccl_textbox || $datefrom );
+            $ccl_query .= "acqdate,le,st-date-normalized=" . $dateto;
         }
     }