Bug 16809: Silence authority warnings C4::Biblio::TransformHtmlToMarc
commit4cabeda007ddb062f60a2c05f69f29a919acbcdf
authorMark Tompsett <mtompset@hotmail.com>
Fri, 24 Jun 2016 15:29:19 +0000 (24 11:29 -0400)
committerFrédéric Demians <f.demians@tamil.fr>
Thu, 8 Sep 2016 20:07:16 +0000 (8 22:07 +0200)
treed2cf3da78f8b68030514f75b44bda442b345e679
parentb711695552e293ddf8f649b12122297c688ced73
Bug 16809: Silence authority warnings C4::Biblio::TransformHtmlToMarc

Most of the floodiness is caused by accessing the cgi parameters
in a context which is hard to determine. By purposefully saving
the value to a scalar variable and using the variable, the issue
disappears, and it will likely be a tiny tad faster as variable
access is faster than multiple function calls.

TEST PLAN
---------
 1) Back up your intranet error log
    -- for example:
       cp ~/koha-dev/var/log/koha-error-log ~/koha-error-log.backup
 2) Blank your intranet error log
    -- for example:
       echo > ~/koha-dev/var/log/koha-error-log
 3) Log into your staff client
 4) Click 'Authorities'
 5) Click 'New from Z39.50'
 5) Type 'Seuss' into 'Name (any):' and press enter
 6) Click 'Import' beside the first link
 7) Click 'Save'
 8) Check your koha-error-log
    -- floody!
 9) Apply patch
10) repeat steps 2-8
    -- blank!
11) restore your intranet error log
   -- for example:
      mv ~/koha-error-log.backup ~/koha-dev/var/log/koha-error-log
12) run koha qa test tools

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with addbiblio.pl. I would have preferred the scalar option in terms
of simpler code, but this works too.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 28ad0ab51321955878082d363be2210589a8261f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
C4/Biblio.pm