View | Details | Raw Unified | Return to bug 11219
Collapse All | Expand All

(-)a/C4/Auth_with_cas.pm (-3 / +18 lines)
Lines 184-191 sub _get_cas_and_service { Link Here
184
    my $query = shift;
184
    my $query = shift;
185
    my $key   = shift;    # optional
185
    my $key   = shift;    # optional
186
186
187
    my $uri = C4::Context->preference('OPACBaseURL'); # server address
187
    my $uri = _url_with_get_params($query);
188
    $uri .= $query->url( -absolute => 1, -query => 1 ); # page with params
189
188
190
    my $casparam = $defaultcasserver;
189
    my $casparam = $defaultcasserver;
191
    $casparam = $query->param('cas') if defined $query->param('cas');
190
    $casparam = $query->param('cas') if defined $query->param('cas');
Lines 195-200 sub _get_cas_and_service { Link Here
195
    return ( $cas, $uri );
194
    return ( $cas, $uri );
196
}
195
}
197
196
197
# Get the current URL with parameters contained directly into URL (GET params)
198
# This method replaces $query->url() which will give both GET and POST params
199
sub _url_with_get_params {
200
    my $query = shift;
201
202
    my $uri_base_part = C4::Context->preference('OPACBaseURL') . $query->script_name();
203
    my $uri_params_part = '';
204
    foreach ( $query->url_param() ) {
205
        $uri_params_part .= '&' if $uri_params_part;
206
        $uri_params_part .= $_ . '=';
207
        $uri_params_part .= URI::Escape::uri_escape( $query->url_param($_) );
208
    }
209
    $uri_base_part .= '?' if $uri_params_part;
210
211
    return $uri_base_part . $uri_params_part;
212
}
213
198
1;
214
1;
199
__END__
215
__END__
200
216
201
- 

Return to bug 11219