View | Details | Raw Unified | Return to bug 24103
Collapse All | Expand All

(-)a/acqui/neworderbiblio.pl (+3 lines)
Lines 113-118 if ($QParser) { Link Here
113
        ( undef, $builtquery, undef, undef, undef, undef, undef, undef, undef, undef ) =
113
        ( undef, $builtquery, undef, undef, undef, undef, undef, undef, undef, undef ) =
114
          $builder->build_query_compat( undef, \@operands, undef, undef, undef, 0, $lang );
114
          $builder->build_query_compat( undef, \@operands, undef, undef, undef, 0, $lang );
115
}
115
}
116
117
$template->param( search_query => $builtquery ) if C4::Context->preference('DumpSearchQueryTemplate');
118
116
my ( $error, $marcresults, $total_hits ) = $searcher->simple_search_compat($builtquery, $results_per_page * ($page - 1), $results_per_page);
119
my ( $error, $marcresults, $total_hits ) = $searcher->simple_search_compat($builtquery, $results_per_page * ($page - 1), $results_per_page);
117
120
118
if (defined $error) {
121
if (defined $error) {
(-)a/authorities/auth_finder.pl (+1 lines)
Lines 77-82 if ( $op eq "do_search" ) { Link Here
77
        \@marclist, \@and_or, \@excluding, \@operator,
77
        \@marclist, \@and_or, \@excluding, \@operator,
78
        \@value, $authtypecode, $orderby
78
        \@value, $authtypecode, $orderby
79
    );
79
    );
80
    $template->param( search_query => $search_query ) if C4::Context->preference('DumpSearchQueryTemplate');
80
    my $offset = $startfrom * $resultsperpage;
81
    my $offset = $startfrom * $resultsperpage;
81
    my ( $results, $total ) =
82
    my ( $results, $total ) =
82
        $searcher->search_auth_compat( $search_query, $offset,
83
        $searcher->search_auth_compat( $search_query, $offset,
(-)a/authorities/authorities-home.pl (+1 lines)
Lines 111-116 if ( $op eq "do_search" ) { Link Here
111
        }
111
        }
112
    );
112
    );
113
113
114
    $template->param( search_query => $search_query ) if C4::Context->preference('DumpSearchQueryTemplate');
114
    $template->param(
115
    $template->param(
115
        csrf_token => Koha::Token->new->generate_csrf({
116
        csrf_token => Koha::Token->new->generate_csrf({
116
            session_id => scalar $query->cookie('CGISESSID'),
117
            session_id => scalar $query->cookie('CGISESSID'),
(-)a/catalogue/search.pl (+2 lines)
Lines 485-490 my $searcher = Koha::SearchEngine::Search->new( Link Here
485
  = $builder->build_query_compat( \@operators, \@operands, \@indexes, \@limits,
485
  = $builder->build_query_compat( \@operators, \@operands, \@indexes, \@limits,
486
    \@sort_by, $scan, $lang, { weighted_fields => !$cgi->param('advsearch'), whole_record => $whole_record });
486
    \@sort_by, $scan, $lang, { weighted_fields => !$cgi->param('advsearch'), whole_record => $whole_record });
487
487
488
$template->param( search_query => $query ) if C4::Context->preference('DumpSearchQueryTemplate');
489
488
## parse the query_cgi string and put it into a form suitable for <input>s
490
## parse the query_cgi string and put it into a form suitable for <input>s
489
my @query_inputs;
491
my @query_inputs;
490
my $scan_index_to_use;
492
my $scan_index_to_use;
(-)a/cataloguing/addbooks.pl (+3 lines)
Lines 80-85 if ($query) { Link Here
80
        ( undef, $builtquery, undef, undef, undef, undef, undef, undef, undef, undef ) =
80
        ( undef, $builtquery, undef, undef, undef, undef, undef, undef, undef, undef ) =
81
          $builder->build_query_compat( undef, \@operands, undef, undef, undef, 0, $lang );
81
          $builder->build_query_compat( undef, \@operands, undef, undef, undef, 0, $lang );
82
    }
82
    }
83
84
    $template->param( search_query => $builtquery ) if C4::Context->preference('DumpSearchQueryTemplate');
85
83
    # find results
86
    # find results
84
    my ( $error, $marcresults, $total_hits ) = $searcher->simple_search_compat($builtquery, $results_per_page * ($page - 1), $results_per_page);
87
    my ( $error, $marcresults, $total_hits ) = $searcher->simple_search_compat($builtquery, $results_per_page * ($page - 1), $results_per_page);
85
88
(-)a/installer/data/mysql/atomicupdate/Bug_24103_add_DumpSearchQueryTemplate_syspref.perl (+9 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        INSERT IGNORE INTO `systempreferences` (variable,value,options,explanation,type)
5
        VALUES ('DumpSearchQueryTemplate',0,'','Add the search query being passed to the search engine into the template for debugging','YesNo')
6
    });
7
    SetVersion( $DBversion );
8
    print "Upgrade to $DBversion done (Bug XXXXX - add DumpSearchQueryTemplate syspref)\n";
9
}
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 160-165 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
160
('DisplayLibraryFacets',  'holding',  'home|holding|both',  'Defines which library facets to display.',  'Choice'),
160
('DisplayLibraryFacets',  'holding',  'home|holding|both',  'Defines which library facets to display.',  'Choice'),
161
('DisplayMultiPlaceHold','1','','Display the ability to place multiple holds or not','YesNo'),
161
('DisplayMultiPlaceHold','1','','Display the ability to place multiple holds or not','YesNo'),
162
('DisplayOPACiconsXSLT','1','','If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages in the OPAC.','YesNo'),
162
('DisplayOPACiconsXSLT','1','','If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages in the OPAC.','YesNo'),
163
('DumpSearchQueryTemplate',0,'','Add the search query being passed to the search engine into the template for debugging','YesNo'),
163
('DumpTemplateVarsIntranet',  '0', NULL ,  'If enabled, dump all Template Toolkit variable to a comment in the html source for the staff intranet.',  'YesNo'),
164
('DumpTemplateVarsIntranet',  '0', NULL ,  'If enabled, dump all Template Toolkit variable to a comment in the html source for the staff intranet.',  'YesNo'),
164
('DumpTemplateVarsOpac',  '0', NULL ,  'If enabled, dump all Template Toolkit variable to a comment in the html source for the opac.',  'YesNo'),
165
('DumpTemplateVarsOpac',  '0', NULL ,  'If enabled, dump all Template Toolkit variable to a comment in the html source for the opac.',  'YesNo'),
165
('EasyAnalyticalRecords','0','','If on, display in the catalogue screens tools to easily setup analytical record relationships','YesNo'),
166
('EasyAnalyticalRecords','0','','If on, display in the catalogue screens tools to easily setup analytical record relationships','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref (+6 lines)
Lines 91-93 Logging: Link Here
91
                  on: Do
91
                  on: Do
92
                  off: "Don't"
92
                  off: "Don't"
93
            - dump all Template Toolkit variable to a comment in the html source for the OPAC.
93
            - dump all Template Toolkit variable to a comment in the html source for the OPAC.
94
        -
95
            - pref: DumpSearchQueryTemplate
96
              choices:
97
                  on: Do
98
                  off: "Don't"
99
            - dump search query as a template parameter, requires DumpTemplateVars[interface] to be visible.
(-)a/opac/opac-search.pl (-1 / +2 lines)
Lines 571-576 if (C4::Context->preference('OpacSuppression')) { Link Here
571
    }
571
    }
572
);
572
);
573
573
574
$template->param( search_query => $query ) if C4::Context->preference('DumpSearchQueryTemplate');
575
574
sub _input_cgi_parse {
576
sub _input_cgi_parse {
575
    my @elements;
577
    my @elements;
576
    my $query_cgi = shift or return @elements;
578
    my $query_cgi = shift or return @elements;
577
- 

Return to bug 24103