Bug 14038: Make nl-search.pl not using C4::Members::Search
To get rid of SQLHelper, we should not use this C4::Members::Search anymore. Test plan for Magnus :) 0/ Enable the pref you need to use the Norwegian national library card ft 1/ Go on the members/nl-search.pl page and search for patrons. 2/ Make sure you search by card number and by "social security number" Signed-off-by: Magnus Enger <magnus@enger.priv.no> Searching works the same with and without the patch. Thanks Jonathan! Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
a1b7f15062
commit
52ee96316f
|
|
@ -42,6 +42,7 @@ use C4::Context;
|
|||
use C4::Output;
|
||||
use C4::Members;
|
||||
use C4::Members::Attributes qw( SetBorrowerAttributes );
|
||||
use C4::Utils::DataTables::Members;
|
||||
use Koha::NorwegianPatronDB qw( NLCheckSysprefs NLSearch NLDecodePin NLGetFirstname NLGetSurname NLSync );
|
||||
use Koha::Database;
|
||||
use Koha::DateUtils;
|
||||
|
|
@ -77,7 +78,12 @@ if ( $op && $op eq 'search' ) {
|
|||
my $identifier = $cgi->param('q');
|
||||
if ( $identifier ) {
|
||||
# Local search
|
||||
my $local_results = Search( $identifier );
|
||||
my $local_results = C4::Utils::DataTables::Members::search(
|
||||
{
|
||||
searchmember => $identifier,
|
||||
dt_params => { iDisplayLength => -1 },
|
||||
}
|
||||
)->{patrons};
|
||||
$template->param( 'local_result' => $local_results );
|
||||
# Search NL, unless we got at least one hit and further searching is
|
||||
# disabled
|
||||
|
|
|
|||
Loading…
Reference in New Issue