[Bug 16154] New: Replace CGI->param with CGI->multi_param in list context

classic Classic list List threaded Threaded
54 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] New: Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

            Bug ID: 16154
           Summary: Replace CGI->param with CGI->multi_param in list
                    context
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: In Discussion
          Severity: enhancement
          Priority: P5 - low
         Component: Acquisitions
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
        Depends on: 15809

Bug 15809 is now pushed, we are able to replace the occurrences of CGI->param
with CGI->multi_param when needed (in list context).

  my @foo = $cgi->param('foo');
must be replaced with
  my @foo = $cgi->multi_param('foo');

and

  $template->param( foo => $cgi->param('foo') );
must be replaced with
  $template->param( foo => scalar $cgi->param('foo') );


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15809
[Bug 15809] versions of CGI < 4.08 do not have multi_param
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|In Discussion               |ASSIGNED

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

--- Comment #1 from Jonathan Druart <[hidden email]> ---
Created attachment 49624
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49624&action=edit
Bug 16154: CGI->multi_param - Declare a list

This patch replaces the occurrences of
  my @foo = $cgi->param('foo');
with
  my @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*my\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

--- Comment #2 from Jonathan Druart <[hidden email]> ---
Created attachment 49625
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49625&action=edit
Bug 16154: CGI->multi_param - Manual changes

This patch does the same as the previous one, but affects lines which
have not been caught by the regex.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

--- Comment #3 from Jonathan Druart <[hidden email]> ---
Created attachment 49626
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49626&action=edit
Bug 16154: CGI->multi_param - Force scalar context

This patch replaces the occurrences of
  $template->param( foo => $cgi->param('foo') );
with
  $template->param( foo => scalar $cgi->param('foo') );

perl -p -i -e 's/(\s*=>\s*)\$(cgi|input|query)\->param\(/$1scalar
\$$2\->param\(/xms' **/*.pl

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

--- Comment #4 from Jonathan Druart <[hidden email]> ---
Created attachment 49627
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49627&action=edit
Bug 16154: CGI->multi_param - Assign a list

This patch replaces the occurrences of
  @foo = $cgi->param('foo');
with
  @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal

--- Comment #5 from Jonathan Druart <[hidden email]> ---
This is the kind of patchset that does not have a clear and specific test plan.
The expected goal is to 1. get rid of the warning "CGI::param called in list
context" in logs, 2. fix the vulnerability caused by the calls of CGI->param in
list context (see description of bug 15809 if you need more info about that).

An important thing to check is that the subroutines modified by this patch
should not be called from scripts which do not use C4::Context (if multi_param
is called).

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #6 from Jonathan Druart <[hidden email]> ---
*** Bug 16150 has been marked as a duplicate of this bug. ***

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Patch doesn't apply

--- Comment #7 from Owen Leonard <[hidden email]> ---
Applying: Bug 16154: CGI->multi_param - Declare a list
Applying: Bug 16154: CGI->multi_param - Manual changes
Applying: Bug 16154: CGI->multi_param - Force scalar context
fatal: sha1 information is lacking or useless (admin/patron-attr-types.pl).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 16154: CGI->multi_param - Force scalar context

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #49626|0                           |1
        is obsolete|                            |

--- Comment #8 from Jonathan Druart <[hidden email]> ---
Created attachment 50175
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50175&action=edit
Bug 16154: CGI->multi_param - Force scalar context

This patch replaces the occurrences of
  $template->param( foo => $cgi->param('foo') );
with
  $template->param( foo => scalar $cgi->param('foo') );

perl -p -i -e 's/(\s*=>\s*)\$(cgi|input|query)\->param\(/$1scalar
\$$2\->param\(/xms' **/*.pl

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #49627|0                           |1
        is obsolete|                            |

--- Comment #9 from Jonathan Druart <[hidden email]> ---
Created attachment 50176
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50176&action=edit
Bug 16154: CGI->multi_param - Assign a list

This patch replaces the occurrences of
  @foo = $cgi->param('foo');
with
  @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Patch doesn't apply         |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #49624|0                           |1
        is obsolete|                            |

--- Comment #10 from Owen Leonard <[hidden email]> ---
Created attachment 50203
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50203&action=edit
[SIGNED-OFF] Bug 16154: CGI->multi_param - Declare a list

This patch replaces the occurrences of
  my @foo = $cgi->param('foo');
with
  my @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*my\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

Signed-off-by: Owen Leonard <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #49625|0                           |1
        is obsolete|                            |

--- Comment #11 from Owen Leonard <[hidden email]> ---
Created attachment 50204
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50204&action=edit
[SIGNED-OFF] Bug 16154: CGI->multi_param - Manual changes

This patch does the same as the previous one, but affects lines which
have not been caught by the regex.

Signed-off-by: Owen Leonard <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #50175|0                           |1
        is obsolete|                            |

--- Comment #12 from Owen Leonard <[hidden email]> ---
Created attachment 50205
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50205&action=edit
[SIGNED-OFF] Bug 16154: CGI->multi_param - Force scalar context

This patch replaces the occurrences of
  $template->param( foo => $cgi->param('foo') );
with
  $template->param( foo => scalar $cgi->param('foo') );

perl -p -i -e 's/(\s*=>\s*)\$(cgi|input|query)\->param\(/$1scalar
\$$2\->param\(/xms' **/*.pl

Signed-off-by: Owen Leonard <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #50176|0                           |1
        is obsolete|                            |

--- Comment #13 from Owen Leonard <[hidden email]> ---
Created attachment 50206
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50206&action=edit
[SIGNED-OFF] Bug 16154: CGI->multi_param - Assign a list

This patch replaces the occurrences of
  @foo = $cgi->param('foo');
with
  @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

Signed-off-by: Owen Leonard <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--- Comment #14 from Owen Leonard <[hidden email]> ---
I tried to go through all the affected pages looking for problems and
everything looked good, nothing broken.

I did find errors in my log for some files, so I think a follow-up is required:

acqui/histsearch.pl
admin/aqbudgetperiods.pl
admin/aqcontract.pl
admin/authorised_values.pl
admin/branches.pl
admin/categories.pl
admin/patron-attr-types.pl
admin/preferences.pl
catalogue/itemsearch.pl
catalogue/search.pl
circ/circulation.pl
patroncards/add_user_search.pl
reserve/request.pl
serials/add_user_search.pl
serials/checkexpiration.pl
tools/koha-news.pl
tools/letter.pl
virtualshelves/shelves.pl

Each of these left an error in my log about "CGI::param called in list context"

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

--- Comment #15 from Jonathan Druart <[hidden email]> ---
Created attachment 50207
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50207&action=edit
Bug 16154: Fix some other occurrences

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

--- Comment #16 from Jonathan Druart <[hidden email]> ---
(In reply to Owen Leonard from comment #14)
> I tried to go through all the affected pages looking for problems and
> everything looked good, nothing broken.
>
> I did find errors in my log for some files, so I think a follow-up is
> required

Thanks Owen for testing.
This follow-up won't fix all the files you listed, but almost all of them.

I'd suggest to open another bug report to catching the others.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #50207|0                           |1
        is obsolete|                            |

--- Comment #17 from Owen Leonard <[hidden email]> ---
Created attachment 50229
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50229&action=edit
[SIGNED-OFF] Bug 16154: Fix some other occurrences

Signed-off-by: Owen Leonard <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |16259


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16259
[Bug 16259] More: Replace CGI->param with CGI->multi_param in list context
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
             Status|Signed Off                  |Patch doesn't apply

--- Comment #18 from Katrin Fischer <[hidden email]> ---
Sorry, patches no longer apply cleanly, can you please rebase?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 16154: CGI->multi_param - Declare a list
Applying: Bug 16154: CGI->multi_param - Manual changes
Applying: Bug 16154: CGI->multi_param - Force scalar context
fatal: sha1 information is lacking or useless (admin/patron-attr-types.pl).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 16154: CGI->multi_param - Force scalar context
The copy of the patch that failed is found in:
   /home/katrin/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in
/tmp/SIGNED-OFF-Bug-16154-CGI-multiparam---Force-scalar-CQshm9.patch

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Patch doesn't apply         |Signed Off

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #50203|0                           |1
        is obsolete|                            |
  Attachment #50204|0                           |1
        is obsolete|                            |
  Attachment #50205|0                           |1
        is obsolete|                            |
  Attachment #50206|0                           |1
        is obsolete|                            |
  Attachment #50229|0                           |1
        is obsolete|                            |

--- Comment #19 from Jonathan Druart <[hidden email]> ---
Created attachment 50644
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50644&action=edit
Bug 16154: CGI->multi_param - Declare a list

This patch replaces the occurrences of
  my @foo = $cgi->param('foo');
with
  my @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*my\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

--- Comment #20 from Jonathan Druart <[hidden email]> ---
Created attachment 50645
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50645&action=edit
Bug 16154: CGI->multi_param - Manual changes

This patch does the same as the previous one, but affects lines which
have not been caught by the regex.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

--- Comment #21 from Jonathan Druart <[hidden email]> ---
Created attachment 50646
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50646&action=edit
Bug 16154: CGI->multi_param - Force scalar context

This patch replaces the occurrences of
  $template->param( foo => $cgi->param('foo') );
with
  $template->param( foo => scalar $cgi->param('foo') );

perl -p -i -e 's/(\s*=>\s*)\$(cgi|input|query)\->param\(/$1scalar
\$$2\->param\(/xms' **/*.pl

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

--- Comment #22 from Jonathan Druart <[hidden email]> ---
Created attachment 50647
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50647&action=edit
Bug 16154: CGI->multi_param - Assign a list

This patch replaces the occurrences of
  @foo = $cgi->param('foo');
with
  @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

--- Comment #23 from Jonathan Druart <[hidden email]> ---
Created attachment 50648
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50648&action=edit
Bug 16154: Fix some other occurrences

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16154] Replace CGI->param with CGI->multi_param in list context

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16154

--- Comment #24 from Katrin Fischer <[hidden email]> ---
Created attachment 50752
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50752&action=edit
[PASSED QA] Bug 16154: CGI->multi_param - Declare a list

This patch replaces the occurrences of
  my @foo = $cgi->param('foo');
with
  my @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*my\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

Signed-off-by: Katrin Fischer <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
12