2
# $Id: logout.tcl 391 2007-01-25 03:53:59Z mikes@u.washington.edu $
3
# ========================================================================
4
# Copyright 2006 University of Washington
6
# Licensed under the Apache License, Version 2.0 (the "License");
7
# you may not use this file except in compliance with the License.
8
# You may obtain a copy of the License at
10
# http://www.apache.org/licenses/LICENSE-2.0
12
# ========================================================================
19
{cid "Missing Command ID"}
22
# and any global config
27
if {$cid != [WPCmd PEInfo key]} {
28
error [list _action Logout "Invalid Operation ID" "Please close this window."]
31
if {$expinbox && [catch {WPCmd PEMailbox expunge inbox} result]} {
35
if {$expcurrent && [catch {WPCmd PEMailbox expunge current} result]} {
36
if {[info exists logouterr] == 0} {
41
if {[catch {WPCmd PESession close} result]} {
42
if {[info exists logouterr] == 0} {
47
if {[catch {WPCmd set wp_ver_dir} verdir]} {
48
set verdir $_wp(appdir)
54
set parms "?verdir=${verdir}"
56
if {[regexp {^[0-9]+$} $serverid]} {
57
append parms "&serverid=$serverid"
60
if {[info exists logouterr]} {
61
append parms "&logerr=[WPPercentQuote $logouterr]"
64
cgi_redirect [cgi_root]/${verdir}/farewell.tcl${parms}