@@ -, +, @@ --- C4/Members.pm | 27 +------------------- admin/aqbudgets.pl | 2 +- .../prog/en/modules/members/moremember.tt | 4 +-- members/moremember.pl | 4 --- t/db_dependent/Koha.t | 13 ++-------- 5 files changed, 6 insertions(+), 44 deletions(-) --- a/C4/Members.pm +++ a/C4/Members.pm @@ -70,7 +70,7 @@ BEGIN { &GetNoticeEmailAddress &GetAge - &GetSortDetails + &GetTitles &GetHideLostItemsPreference @@ -1495,31 +1495,6 @@ sub SetAge{ return $borrower; } # sub SetAge -=head2 GetSortDetails (OUEST-PROVENCE) - - ($lib) = &GetSortDetails($category,$sortvalue); - -Returns the authorized value details -C<&$lib>return value of authorized value details -C<&$sortvalue>this is the value of authorized value -C<&$category>this is the value of authorized value category - -=cut - -sub GetSortDetails { - my ( $category, $sortvalue ) = @_; - my $dbh = C4::Context->dbh; - my $query = qq|SELECT lib - FROM authorised_values - WHERE category=? - AND authorised_value=? |; - my $sth = $dbh->prepare($query); - $sth->execute( $category, $sortvalue ); - my $lib = $sth->fetchrow; - return ($lib) if ($lib); - return ($sortvalue) unless ($lib); -} - =head2 MoveMemberToDeleted $result = &MoveMemberToDeleted($borrowernumber); --- a/admin/aqbudgets.pl +++ a/admin/aqbudgets.pl @@ -30,7 +30,7 @@ use C4::Branch; # GetBranches use C4::Auth; use C4::Acquisition; use C4::Budgets; -use C4::Members; # calls GetSortDetails() +use C4::Members; use C4::Context; use C4::Output; use C4::Koha; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -391,8 +391,8 @@ function validate1(date) { [% END %] - [% IF ( sort1 ) %]
  • Sort field 1:[% lib1 %]
  • [% END %] - [% IF ( sort2 ) %]
  • Sort field 2:[% lib2 %]
  • [% END %] + [% IF ( sort1 ) %]
  • Sort field 1:[% AuthorisedValues.GetByCode('Bsort1', sort1) %]
  • [% END %] + [% IF ( sort2 ) %]
  • Sort field 2:[% AuthorisedValues.GetByCode('Bsort2', sort2) %]
  • [% END %]
  • Username: [% userid %]
  • Password: [% IF ( password ) %] --- a/members/moremember.pl +++ a/members/moremember.pl @@ -209,10 +209,6 @@ my $library = Koha::Libraries->find( $data->{branchcode})->unblessed; @{$data}{keys %$library} = values %$library; # merge in all branch columns my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); -my $lib1 = &GetSortDetails( "Bsort1", $data->{'sort1'} ); -my $lib2 = &GetSortDetails( "Bsort2", $data->{'sort2'} ); -$template->param( lib1 => $lib1 ) if ($lib1); -$template->param( lib2 => $lib2 ) if ($lib2); # If printing a page, send the account informations to the template if ($print eq "page") { --- a/t/db_dependent/Koha.t +++ a/t/db_dependent/Koha.t @@ -21,7 +21,7 @@ $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; subtest 'Authorized Values Tests' => sub { - plan tests => 7; + plan tests => 4; my $data = { category => 'CATEGORY', @@ -46,18 +46,9 @@ subtest 'Authorized Values Tests' => sub { # Tests SKIP: { - skip "INSERT failed", 4 unless $insert_success; + skip "INSERT failed", 1 unless $insert_success; is ( GetAuthorisedValueByCode($data->{category}, $data->{authorised_value}), $data->{lib}, "GetAuthorisedValueByCode" ); - - my $sortdet=C4::Members::GetSortDetails("lost", "3"); - is ($sortdet, "Lost and Paid For", "lost and paid works"); - - my $sortdet2=C4::Members::GetSortDetails("loc", "child"); - is ($sortdet2, "Children's Area", "Child area works"); - - my $sortdet3=C4::Members::GetSortDetails("withdrawn", "1"); - is ($sortdet3, "Withdrawn", "Withdrawn works"); } # Clean up --