bug: add items to label batch - need userenv loaded before call to SimpleSearch
Since I added more IndependantBranches code to my git repo I need userenv loaded before SimpleSearch() is called. I think get_template_and_user() should be called as soon as possible. In this case it could mean two calls, but it has to be so. Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
parent
35c8a5be58
commit
41d550df4f
|
|
@ -82,6 +82,18 @@ if ( $op eq "do_search" ) {
|
|||
$datefrom = $query->param('datefrom');
|
||||
$dateto = $query->param('dateto');
|
||||
|
||||
( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "labels/result.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => { borrowers => 1 },
|
||||
flagsrequired => { catalogue => 1 },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
||||
if ($datefrom) {
|
||||
$datefrom = C4::Dates->new($datefrom);
|
||||
$ccl_query .= ' and ' if $ccl_textbox;
|
||||
|
|
@ -177,18 +189,6 @@ if ($show_results) {
|
|||
$debug and warn "**********\@results**********\n";
|
||||
$debug and warn Dumper(@results);
|
||||
|
||||
( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "labels/result.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => { borrowers => 1 },
|
||||
flagsrequired => { catalogue => 1 },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
||||
# build page nav stuff.
|
||||
my ( @field_data, @numbers );
|
||||
$total = $total_hits;
|
||||
|
|
|
|||
Loading…
Reference in New Issue