Bug 16836 - Document unused parameters of SearchAuthorities
Summary: Document unused parameters of SearchAuthorities
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-30 10:02 UTC by Marcel de Rooy
Modified: 2016-12-30 12:06 UTC (History)
1 user (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Crowdfunding committed: 0
Crowdfunding contact:
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 16836: Document unused parameters of SearchAuthorities (1.57 KB, patch)
2016-06-30 10:09 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2016-06-30 10:02:50 UTC

    
Comment 1 Marcel de Rooy 2016-06-30 10:09:19 UTC
Created attachment 52951 [details] [review]
Bug 16836: Document unused parameters of SearchAuthorities

Two parameters $and_or and $excluding are not used.

Test plan:
Run t/db_dependent/Search.t
Comment 2 Héctor Eduardo Castro Avalos 2016-07-01 15:09:40 UTC
If you query $ git grep 'SearchAuthorities'


There are some lines that use the two parameters, maybe exist more:


authorities/auth_finder.pl:      SearchAuthorities( \@marclist, \@and_or, \@excluding, \@operator, \@value,
authorities/authorities-home.pl:    #my ( $results, $total ) = SearchAuthorities(
authorities/ysearch.pl:    my ( $results, $total ) = SearchAuthorities( \@marclist, \@and_or, \@excluding, \@operator, \@value, $startfrom * $resultsperpage, $resultsperpage, $authtypecode, $orderby );
cataloguing/value_builder/unimarc_field_210c.pl:###TODO To rewrite in order to use SearchAuthorities
cataloguing/value_builder/unimarc_field_210c.pl:        my ($results,$total) = SearchAuthorities( \@tags,\@and_or,
cataloguing/value_builder/unimarc_field_225a.pl:    my ($results,$total) = SearchAuthorities( \@tags,\@and_or,

Regards
Comment 3 Marcel de Rooy 2016-07-01 17:31:57 UTC
(In reply to Héctor Eduardo Castro Avalos from comment #2)
> If you query $ git grep 'SearchAuthorities'
> 
> 
> There are some lines that use the two parameters, maybe exist more:
> 
> 
> authorities/auth_finder.pl:      SearchAuthorities( \@marclist, \@and_or,
> \@excluding, \@operator, \@value,
> authorities/authorities-home.pl:    #my ( $results, $total ) =
> SearchAuthorities(
> authorities/ysearch.pl:    my ( $results, $total ) = SearchAuthorities(
> \@marclist, \@and_or, \@excluding, \@operator, \@value, $startfrom *
> $resultsperpage, $resultsperpage, $authtypecode, $orderby );
> cataloguing/value_builder/unimarc_field_210c.pl:###TODO To rewrite in order
> to use SearchAuthorities
> cataloguing/value_builder/unimarc_field_210c.pl:        my ($results,$total)
> = SearchAuthorities( \@tags,\@and_or,
> cataloguing/value_builder/unimarc_field_225a.pl:    my ($results,$total) =
> SearchAuthorities( \@tags,\@and_or,
> 
> Regards

Hello Hector,

That is true. The parameters are passed to the routine, but they actually do nothing. This patch makes that fact more visible without having to change all calls of the routine. Note that this allows someone to adjust the routine to do something useful with these parameters.

Marcel
Comment 4 Marcel de Rooy 2016-12-30 12:06:49 UTC
Time goes by