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

(-)a/opac/cgi-bin/opac/svc/auth/googleopenidconnect (-5 / +8 lines)
Lines 214-225 elsif ( defined $query->param('code') ) { Link Here
214
                    #handle redirect to main.pl, for private opac
214
                    #handle redirect to main.pl, for private opac
215
                    my $uri;
215
                    my $uri;
216
		    my $referer = $session->param( 'auth-refer-uri' );
216
		    my $referer = $session->param( 'auth-refer-uri' );
217
                    if (C4::Context->preference('OpacPublic') ) {
217
		    if ( $referer =~ /^$host/ ) {
218
		      my $regex = qr/logout\.x=1/mp;
219
		      $uri = $referer =~ s/$regex//rg;
220
		    } else {
221
                      if (C4::Context->preference('OpacPublic') ) {
218
                        $uri    =  '/cgi-bin/koha/opac-user.pl';
222
                        $uri    =  '/cgi-bin/koha/opac-user.pl';
219
                    } else {
223
                      } else {
220
                        $uri    =  '/cgi-bin/koha/opac-main.pl';
224
                        $uri    =  '/cgi-bin/koha/opac-main.pl';
221
                    }
225
                      }
222
		    $uri = $referer;
226
		    }
223
                    print $query->redirect(
227
                    print $query->redirect(
224
                        -uri    => $uri,
228
                        -uri    => $uri,
225
                        -cookie => $cookie
229
                        -cookie => $cookie
226
- 

Return to bug 34164