Bug 16809: Silence authority warnings C4::Biblio::TransformHtmlToMarc
commit6acc9005316b66e0ef3c58bfbec373b6cfb63051
authorMark Tompsett <mtompset@hotmail.com>
Fri, 24 Jun 2016 15:29:19 +0000 (24 11:29 -0400)
committerJulian Maurice <julian.maurice@biblibre.com>
Fri, 16 Sep 2016 07:59:55 +0000 (16 09:59 +0200)
tree0400b5467299b77564257c79f44fea56112b872f
parent4c8ca85c45f706290ca6009fc3e33c5dee81f7d0
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>
(cherry picked from commit 4cabeda007ddb062f60a2c05f69f29a919acbcdf)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Conflicts:
C4/Biblio.pm
C4/Biblio.pm