Bugzilla – Attachment 1920 Details for
Bug 4227
opac-logout.pl is no longer used.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch.
0002-Bug-4227-Removes-unused-opac-logout.pl.patch (text/plain), 3.30 KB, created by
Chris Cormack
on 2010-02-19 01:06:00 UTC
(
hide
)
Description:
Proposed patch.
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2010-02-19 01:06:00 UTC
Size:
3.30 KB
patch
obsolete
>From fbd62876f0004fbace81a6ae0b3d51a2f1bbe00b Mon Sep 17 00:00:00 2001 >From: Garry Collum <gcollum@gmail.com> >Date: Thu, 18 Feb 2010 19:23:12 -0500 >Subject: [PATCH] Bug 4227: Removes unused opac-logout.pl. >Content-Type: text/plain; charset="utf-8" > >Performed a recursive grep on the entire file structure to confirm. >--- > opac/opac-logout.pl | 84 --------------------------------------------------- > 1 files changed, 0 insertions(+), 84 deletions(-) > delete mode 100755 opac/opac-logout.pl > >diff --git a/opac/opac-logout.pl b/opac/opac-logout.pl >deleted file mode 100755 >index b8a5c75..0000000 >--- a/opac/opac-logout.pl >+++ /dev/null >@@ -1,84 +0,0 @@ >-#!/usr/bin/perl >- >-# 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 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., 59 Temple Place, >-# Suite 330, Boston, MA 02111-1307 USA >- >-use CGI; >-use C4::Context; >-use C4::Auth qw/:DEFAULT get_session/; >-use C4::Output; >-use HTML::Template::Pro; >-use CGI::Session; >- >-my $query=new CGI; >- >-my $sessionID=$query->cookie('CGISESSID'); >- >-if ($ENV{'REMOTE_USER'}) { >- print $query->header(); >- print startpage(); >- print startmenu('catalogue'); >- print qq| >-<h1>Logout Feature Not Available</h1> >-Your Koha server is configured to use a type of authentication called "Basic >-Authentication" instead of using a cookies-based authentication system. With >-Basic Authentication, the only way to logout of Koha is by exiting your >-browser. >-|; >- print endmenu('catalogue'); >- print endpage(); >- exit; >-} >- >-my $sessions; >-open (S, "/tmp/sessions"); >- # FIXME - Come up with a better logging mechanism >-while (my ($sid, $u, $lasttime) = split(/:/, <S>)) { >- chomp $lasttime; >- (next) unless ($sid); >- (next) if ($sid eq $sessionID); >- $sessions->{$sid}->{'userid'}=$u; >- $sessions->{$sid}->{'lasttime'}=$lasttime; >-} >-close S; >-open (S, ">/tmp/sessions"); >-foreach (keys %$sessions) { >- my $userid=$sessions->{$_}->{'userid'}; >- my $lasttime=$sessions->{$_}->{'lasttime'}; >- print S "$_:$userid:$lasttime\n"; >-} >-close S; >- >-my $dbh = C4::Context->dbh; >-# Check that this is the ip that created the session before deleting it >-# This script and function are apparently unfinished. --atz (Dec 4 2007) >-my $session = get_session($sessionID); >-$session->flush; >-$session->delete; >-my $sth=$dbh->prepare("delete from sessions where sessionID=?"); >-$sth->execute($sessionID); >-open L, ">>/tmp/sessionlog"; >-printf L "%20s from %16s logged out at %30s (manual log out).\n", $userid, $ip, localtime; >- # where is $ip is coming from?? >-close L; >- >-my $cookie=$query->cookie(-name => 'CGISESSID', >- -value => '', >- -expires => '+1y'); >- >-# Should redirect to opac home page after logging out >-print $query->redirect("/cgi-bin/koha/opac-main.pl"); >-exit; >- >-- >1.5.6.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4227
: 1920