Koha/authorities
Jonathan Druart 58661d9b4b Bug 17118: (follow-up 15381) Fix regression when clearing a linked authority
Changes made on bug 15381 assumed that the authid was always set.
But if the user wants to clear the field of the authority, the script is
called with authid=0 (FIXME...)

To fix this issue, it's better to move the new calls to
  Koha::Authorities->find($authid)->authtypecode
and
  Koha::Authority::Types->find($authtypecode);
at the correct place

Test plan:
1. Edit a record which has a field linked to an
   authority record (100a for instance).
2. Click the link which triggers the tag editor.
   A pop-up window should be displayed.
3. In the pop-up window, click the "Clear field"
   button.
=> Without this patch A second pop-up window opens and displays an error:
  Can't call method "authtypecode" on an undefined value at /authorities/blinddetail-biblio-search.pl line 61.
=> With this patch applied the field is correctly cleared.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-02 14:01:34 +00:00
..
auth_finder.pl Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
authorities-home.pl Bug 17048: Fix pagination offset for authority searches 2016-09-02 13:49:51 +00:00
authorities-list.pl Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
authorities.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00
blinddetail-biblio-search.pl Bug 17118: (follow-up 15381) Fix regression when clearing a linked authority 2016-09-02 14:01:34 +00:00
detail-biblio-search.pl Bug 15381: Remove GetAuthType and GetAuthTypeCode 2015-12-31 18:59:02 +00:00
detail.pl Bug 15381: Remove GetAuthType and GetAuthTypeCode 2015-12-31 18:59:02 +00:00
export.pl
merge.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00
merge_ajax.pl Bug 14589: Adjust authorities_merge_ajax and replace some indirect syntax 2015-11-02 12:49:13 -03:00
ysearch.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00