Bug 5243

Summary: C4::Search::SimpleSearch call in AuthoritiesMarc.pm
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: CatalogingAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: major    
Priority: PATCH-Sent (DO NOT USE) CC: chris, koha.sekjal
Version: rel_3_2   
Hardware: PC   
OS: Linux   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed patch
Proposed patch (3.2.0)

Description Fridolin Somers 2010-09-23 10:30:05 UTC
In 3.2 beta :

AuthoritiesMarc.pm fails because of external function call : 

   my ($error, $results, $total_hits)=SimpleSearch( $query, 0, 1, [ "authorityserver" ] );

SimpleSearch is a function of C4/Search.pm so it must be :

  my ($error, $results, $total_hits) = C4::Search::SimpleSearch( $query, 0, 1, [ "authorityserver" ] );

--
You may see that a correct call is made line 363.

Regards.
Comment 1 Fridolin Somers 2010-09-23 10:31:14 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2010-10-27 23:38:09 UTC
Is this happening in 3.2.0?  Your proposed patch won't hurt anything, but it shouldn't be necessary since C4::Search exports SimpleSearch by default.
Comment 3 Fridolin Somers 2010-10-28 07:38:47 UTC
(In reply to comment #2)
> Is this happening in 3.2.0?  Your proposed patch won't hurt anything, but it
> shouldn't be necessary since C4::Search exports SimpleSearch by default.

Yes it is present in 3.2.0.

When I create a new authority, I have this message : 
Undefined subroutine &C4::AuthoritiesMarc::SimpleSearch called at /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 902.

I noticed that the full method is present line 362 : 
  my ($err,$res,$result) = C4::Search::SimpleSearch($query,0,10);

So why make it different at line 902 ?
Comment 4 Fridolin Somers 2010-10-28 07:46:00 UTC
Created attachment 2704 [details] [review]
Proposed patch (3.2.0)

Updated for 3.2.0
Comment 5 Galen Charlton 2010-10-28 12:10:51 UTC
Must be something peculiar to your setup - as I said, works for me.  Since, as I also said, it doesn't hurt anything to add 'C4::Search::' to the function call, I've submitted your patch with my signoff.  Thanks!
Comment 6 Fridolin Somers 2010-10-28 12:43:57 UTC
(In reply to comment #5)
> Must be something peculiar to your setup - as I said, works for me.  Since, as
> I also said, it doesn't hurt anything to add 'C4::Search::' to the function
> call, I've submitted your patch with my signoff.  Thanks!

I'm using Debian Squeeze, maybe it's the reason.
Comment 7 Chris Cormack 2010-11-02 04:25:19 UTC
Pushed, please test and close
Comment 9 Chris Nighswonger 2010-11-18 03:15:16 UTC
This bug has a patch presently committed to HEAD and 3.2.x.

Please take the appropriate action to update the status of this bug.

Remember, bugs which have been resolved should be tested and marked closed, preferably by the original reporter.
Comment 10 Fridolin Somers 2010-11-18 09:33:09 UTC
Closed.

End of story.