Bug 14659: Allow patrons to enter card number and patron category on OPAC registratio...
[koha.git] / C4 / Auth_with_cas.pm
index 82e3d83..1749333 100644 (file)
@@ -4,18 +4,18 @@ package C4::Auth_with_cas;
 #
 # This file is part of Koha.
 #
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
 #
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use strict;
 use warnings;
@@ -208,13 +208,14 @@ sub _url_with_get_params {
                         C4::Context->preference('staffClientBaseURL');
 
     my $uri_params_part = '';
-    foreach ( $query->url_param() ) {
+    foreach my $param ( $query->url_param() ) {
         # url_param() always returns parameters that were deleted by delete()
         # This additional check ensure that parameter was not deleted.
-        if ($query->param($_)) {
+        my $uriPiece = $query->param($param);
+        if ($uriPiece) {
             $uri_params_part .= '&' if $uri_params_part;
-            $uri_params_part .= $_ . '=';
-            $uri_params_part .= URI::Escape::uri_escape( $query->param($_) );
+            $uri_params_part .= $param . '=';
+            $uri_params_part .= URI::Escape::uri_escape( $uriPiece );
         }
     }
     $uri_base_part .= '?' if $uri_params_part;