Bug 14351

Summary: Remove given-when from opac-search.pl
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Architecture, internals, and plumbingAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: chris, tomascohen, wizzyrea
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 13307    
Bug Blocks:    
Attachments: Bug 14351: Remove given-when from opac-search.pl
Bug 14351: Remove given-when from opac-search.pl
Bug 14351: Remove given-when from opac-search.pl

Description Katrin Fischer 2015-06-06 15:29:26 UTC
given ($pathcode)
{
  when ('"ads"') { $template->param('ReturnPath' => '/cgi-bin/koha/opac-search.pl?returntosearch=1'); }
    when ('"exs"') {
      $template->param('ReturnPath' => '/cgi-bin/koha/opac-search.pl?expanded_options=1&returntosearch=1');
    }
        default {warn "ReturnPath swith error";}
}
Comment 1 Katrin Fischer 2015-06-07 23:58:02 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2015-06-14 02:31:39 UTC
Comment on attachment 39964 [details] [review]
Bug 14351: Remove given-when from opac-search.pl

Review of attachment 39964 [details] [review]:
-----------------------------------------------------------------

Lovely code clean up that improves readability!
Comment 3 Mark Tompsett 2015-06-14 02:51:24 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2015-06-16 08:35:41 UTC
Created attachment 40162 [details] [review]
Bug 14351: Remove given-when from opac-search.pl

Reformats given-when to if-elsif-else in opac-search.pl
to remove the experimental feature and with it a lot
of warnings from the logs.

To test:
- Do several different advanced searches with and
  without expanded search options
- Verify the link back to the search appears above
  the results list and works correctly

See also: test plan on bug 13307

NOTE: Even installed firefox plug in to edit cookies to
      trigger else case. :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 5 Tomás Cohen Arazi 2015-06-17 12:57:46 UTC
Patch pushed to master.

Thanks Katrina!
Comment 6 Chris Cormack 2015-06-17 22:22:35 UTC
Pushed to 3.20.x will be in 3.20.1
Comment 7 Liz Rea 2015-06-22 23:32:06 UTC
Hi,

This patch doesn't apply cleanly to 3.18.x. If you feel it should be included, please provide a version for 3.18.x.

Cheers,
Liz
Comment 8 Katrin Fischer 2015-06-23 06:05:30 UTC
Bug 13307 is not in 3.18, so this is not needed.