1
# $Id: common 391 2007-01-25 03:53:59Z mikes@u.washington.edu $
2
# ========================================================================
3
# Copyright 2008 University of Washington
5
# Licensed under the Apache License, Version 2.0 (the "License");
6
# you may not use this file except in compliance with the License.
7
# You may obtain a copy of the License at
9
# http://www.apache.org/licenses/LICENSE-2.0
11
# ========================================================================
15
# Purpose: TCL script snippets that the various CGI script generating pages
19
proc wpSelectedClass {seld unread defclass} {
32
proc wpPageTitle {page} {
33
return "$page - Web Alpine 2.0"
36
proc current_context {page c f cc cf} {
37
set ct {[lsearch {browse view} $page] >= 0 && }
38
if {0 == $cc && 0 == [string compare -nocase inbox $cf]} {
39
append ct {0 == $c && 0 == [string compare -nocase inbox $f]}
41
append ct {$cc == $c && 0 == [string compare $cf $f]}
44
set current [expr $ct]
47
proc folder_link {current page c f u unread {ficon ""}} {
48
set url "browse/$c/[WPPercentQuote $f]"
54
set urlid "id=\"gFolder\""
55
set urid "id=\"unreadCurrent\""
56
set fid "id=\"fCurrent\""
57
set onclick "onClick=return newMessageList({parms:{op:'unfocus',page:'new'}});"
58
} elseif {[string length $ficon]} {
59
set fq [cgi_quote_html $f]
60
set urid "id=\"unread${fq}\""
61
set fid "id=\"f${fq}\""
62
set onclick [onClick $clickurl]
69
set fclass "class=bld"
71
} elseif {[string length $ficon] || $current} {
75
if {[info exists urc]} {
76
set urt [cgi_span "class=wap unrd" $urid $urc]
81
if {![string length $ficon]} {
82
set ficon [cgi_span "class=sp splc splc7" ""]
84
return "[cgi_url "$ficon[cgi_span $fid $fclass [cgi_quote_html $f]]" $url class=wap $urlid $onclick]$urt"
87
proc empty_link {current falias c} {
89
set emptyfunc emptyCurrent
92
Trash { set emptyfunc emptyTrash}
93
Junk { set emptyfunc emptyJunk }
96
if {[info exists emptyfunc]} {
97
return "\[[cgi_url "Empty" "#" "onClick=panelConfirm('Are you sure you want to permanently delete the contents of the $falias folder?<p>Deleted messages are gone forever.',{text:'Empty $falias',fn:$emptyfunc}); return false;" title="Permanently delete all messages in the $falias folder" class=wap]\]"
103
proc context_class {current} {
104
if {$current && ![WPCmd PEMailbox focus]} {
111
proc div_folder {page c f u cc cf unread {ficon ""}} {
112
set current [current_context $page $c $f $cc $cf]
113
cgi_division class="[context_class $current]" {
114
cgi_put [folder_link $current $page $cc $cf $u $unread $ficon]
118
proc wpStatusAndNewmailJavascript {} {
119
foreach sm [WPCmd PEInfo statmsgs] {
120
regsub -all {'} $sm {\'} sm
121
cgi_puts " addStatusMessage('$sm',15);"
123
if {[catch {WPCmd PEMailbox newmail 0} newmail]} {
124
regsub -all {'} $newmail {\'} newmail
125
cgi_puts " addStatusMessage('new mail error: $newmail',15);"
127
catch {WPCmd PEMailbox newmailreset}
128
if {[lindex $newmail 0] > 0} {
129
cgi_puts " addStatusMessage(parseNewMail('$newmail'),15);"
132
cgi_puts " displayStatusMessages();"
137
proc onClick {dest} {
140
if {[string length $clicktest]} {
141
return "onClick=[$clicktest $dest]"
147
# table representing common overall page layout
149
# NOTES: bodyform doesn't flow thru cgi.tcl,but it keeps menu bar's
150
# easier for caller to keep stright
152
proc wpCommonPageLayout {curpage c f u context searchform leavetest cmds menubar_top content menubar_bottom} {
155
set thispage [lindex $curpage 0]
157
set clicktest $leavetest
159
# various positioned elements
162
cgi_division id="bePatient" {
166
cgi_table class="page" cellpadding="0" cellspacing="0" {
170
cgi_table_data class="spc" colspan="3" {
171
cgi_put [cgi_span "class=sp trans" "style=height:1px;width:2px;" [cgi_span " "]]
177
cgi_table_data class="wap topHdr" {
178
cgi_division id=hdrLogo {
179
cgi_puts [cgi_img "img/cbn/alpinelogo.gif" name="logo" class="logo" "title=Web Alpine [WPCmd PEInfo version]" class=wap]
180
cgi_puts [cgi_span "class=logo wap" "v [WPCmd PEInfo version].[WPCmd PEInfo revision]"]
184
cgi_table_data class="topHdr" {
185
cgi_put [cgi_span "class=sp trans" "style=height:2px;width:5px;" " "]
188
cgi_table_data class="wap topHdr" {
189
cgi_division class=hdrContent {
191
if {[catch {WPCmd PERss news} news]} {
192
cgi_put [cgi_nbspace]
193
cgi_html_comment "RSS FAILURE: $news"
195
if {[llength $news] > 0} {
199
cgi_put [cgi_span class=RSS $style "[cgi_span "class=sp newsImg" "onClick=\"return rotateNews(this);\"" ""][cgi_url [lindex $item 0] [lindex $item 1] "onClick=this.blur();" id=newsItem$n target=_blank]"]
200
set style "style=display: none;"
203
cgi_put [cgi_nbspace]
208
cgi_division class=wbar id=statusMessage {
209
cgi_division class=status {
210
cgi_division "class=\"flt edge\"" {
211
cgi_put [cgi_span "class=sp spsm sm1" ""]
213
cgi_division "class=\"frt cap\"" {}
214
cgi_division "class=\"frt edge\"" {
215
cgi_put [cgi_url [cgi_span "class=sp spsm sm2" ""] "" class=wap "onClick=hideStatusMessage(); return false;"]
217
cgi_division class=center id=statusMessageText {}
221
# WEATHER/USAGE/STATUS
222
cgi_division class=wbar id=weatherBar {
224
cgi_division class=weather id=rssWeather {
225
if {[catch {WPCmd PERss weather} weather]} {
226
cgi_html_comment "RSS FAILURE: $weather"
227
cgi_put [cgi_nbspace]
229
if {[llength $weather] > 0} {
230
set item [lindex $weather 0]
231
cgi_html_comment "index 2 is: [lindex $item 2]"
232
cgi_put [cgi_url [lindex $item 0] [lindex $item 1] "onClick=this.blur();" target=_blank]
234
cgi_put [cgi_nbspace]
238
if {[info exists _wp(usage)]
239
&& 0 == [catch {exec -- $_wp(usage) [WPCmd set env(WPUSER)]} usage]
240
&& [regexp {^([0-9]+)[ ]+([0-9]+)$} $usage dummy use_current use_total]
242
&& $use_current <= $use_total} {
243
cgi_division class=usage {
244
cgi_table width="180px" cellpadding="0" cellspacing="0" {
246
cgi_table_data class=wap width="1%" align=right {
247
cgi_put [cgi_nbspace]
249
cgi_table_data class=wap width="98%" {
251
set useperc [expr {($use_current * 100) / $use_total}]
253
cgi_table border=0 width="100%" height="12px" cellspacing=0 cellpadding=0 align=right {
254
set percentage [expr {($use_current * 100)/$use_total}]
256
cgi_table_data class=wap align=right "style=\"border: 1px solid black; border-right: 0; background-color: #408040;\"" width="$useperc%" {
257
cgi_put [cgi_span "class=sp trans" "style=height:1px;width:1px;" [cgi_span " "]]
259
cgi_table_data class=wap align=right "style=\"border: 1px solid black; background-color: #ffffff;\"" width="[expr {100 - $useperc}]%" {
260
cgi_put [cgi_span "class=sp trans" "style=height:1px;width:1px;" [cgi_span " "]]
265
cgi_table_data class=wap width="1%" align=right {
267
if {[info exists _wp(usage_link)]} {
268
set txt [cgi_url $use_total $_wp(usage_link) "onClick=this.blur();" title="Detailed usage report" target="_blank"]
273
cgi_put [cgi_span "style=margin-left: .25em" $txt]
281
cgi_division class=pageTitle id=pageTitle {
285
cgi_division class=commands {
294
cgi_table_data class=noscript colspan="3" {
295
cgi_put "This version of Web Alpine requires Javascript. Please enable Javascript, or use the [cgi_url "HTML Version" "$_wp(serverpath)/$_wp(appdir)/wp.tcl"] of Web Alpine"
301
cgi_table_data id=leftColumn class="wap checkMailandCompose" {
302
cgi_table class="toolbarTbl" cellpadding="0" cellspacing="0" {
305
cgi_table_data class="wap" {
307
if {0 == [regexp {^[0-9]+$} $c]} {
313
if {0 == [string length $f]} {
314
append nUrl "/INBOX'"
316
append nUrl "/[WPPercentQuote $f]"
319
set nUrl "browse/$c/$f"
320
set onArrival "newMessageList({parms:{'op':'noop'}});"
321
cgi_put [cgi_url [cgi_span "class=sp spmbi spmb15" "Check Mail"] $nUrl title="Check for New Mail" id=gCheck "onClick=return newMailCheck(0);"]
323
cgi_table_data class="wap dv1" {
324
cgi_puts [cgi_span "class=sp spmb spmb3" ""]
326
cgi_table_data class="wap" {
328
if {[string compare compose $thispage]} {
330
browse { append cUrl "?pop=browse/$c/$f" }
331
view { append cUrl "?pop=view/$c/$f/$u" }
332
default { append cUrl "?pop=$thispage" }
336
cgi_put [cgi_url [cgi_span "class=sp spmbi spmb16" "Compose"] $cUrl id=composeLink title="Compose New Message" [onClick $cUrl]]
342
cgi_division class=searchFormDiv {
343
cgi_form [lindex $searchform 0] id=searchForm method=post enctype=multipart/form-data {
344
if {[string length [lindex $searchform 3]]} {
345
set sclick [lindex $searchform 3]
347
set sclick "showStatusMessage('Search is NOT implemented yet',3)"
350
cgi_text "searchText=Search in [lindex $searchform 1]" class=wap id=searchField title="Click here to search" "onBlur=recallTextField(this, 'Search in [lindex $searchform 1]')" "onClick=\"clearTextField(this, 'Search in [lindex $searchform 1]')\"" "onKeyPress=\"return searchOnEnter(event,'searchButton');\"" maxlength="256"
351
cgi_put "<input alt=\"Search\" name=\"search\" class=\"sp searchBtn\" type=\"submit\" value=\"\" src=\"\" id=\"searchButton\" onClick=\"${sclick}; this.blur(); return false;\" />"
355
if {[lsearch {browse view} $thispage] >= 0 && [set searched [WPCmd PEMailbox searched]]} {
357
if {[WPCmd PEMailbox focus]} {
358
append srclass " sel"
361
set style "display:none;"
364
cgi_division id="searchRefine" style=\"$style\" {
365
cgi_select scope id=searchScope {
366
cgi_option "Search within Results" value=narrow
367
cgi_option "Add to Search Results" value=broad
368
cgi_option "New Search" value=new selected
374
if {[lindex $searchform 2]} {
375
cgi_division id=searchAdvance {
376
cgi_puts [cgi_url "Advanced Search" "browse/$c/$f?search=1" class="wap" "onClick=return advanceSearch();"]
378
cgi_division id=searchClear style=$style {
379
cgi_puts "\[[cgi_url Clear # class="wap" "onClick=return newMessageList({parms:{op:'search',type:'none',page:'new'}});"]\]"
383
cgi_division class=searchFormDiv {cgi_puts [cgi_nbspace]}
385
cgi_division id=searchResult class="$srclass" style=\"$style\" {
386
cgi_puts [cgi_url "[cgi_span "class=sp splc splc9" ""][cgi_span class=bld id=searchResultText [cgi_quote_html "Search Result ($searched)"]]" browse/$c/$f?search=1 class=wap "onClick=return listSearchResults();"]
389
if {0 == [string compare [lindex $curpage 0] settings]} {
390
uplevel 1 [lindex $curpage 1]
392
cgi_division class="folderPane" {
393
cgi_anchor_name folders
394
cgi_division class=folderList {
395
set defc [WPCmd PEFolder defaultcollection]
398
cgi_puts "function emptyCurrent(){"
399
cgi_puts " doEmpty(null,'all');"
401
cgi_puts "function emptyTrash(){"
402
cgi_puts " emptyFolder('$defc','[lindex [WPCmd PEConfig varget trash-folder] 0]','all',{status:true,fn:'fixupUnreadCount(\"Trash\",0)'});"
404
if {[info exists _wp(spamfolder)]} {
405
cgi_puts "function emptyJunk(){"
406
cgi_puts " emptyFolder('$defc','$_wp(spamfolder)','all',{status:true,fn:'fixupUnreadCount(\"Junk\",0)'});"
411
set current [current_context $thispage $c $f 0 INBOX]
412
cgi_division class="[context_class $current]" id=targetInbox {
413
cgi_put [folder_link $current $thispage 0 INBOX $u [WPCmd PEFolder unread 0 INBOX] [cgi_span "class=sp splc splc1" ""]]
414
if {0 == [string compare browse $thispage] && [string compare -nocase inbox $f]} {
415
lappend ddtargets [list targetInbox 0 INBOX]
419
set draftf [lindex [WPCmd PEConfig varget postponed-folder] 0]
420
if {0 == [catch {WPCmd PEFolder exists $defc $draftf} result] && $result} {
421
div_folder $thispage $c $f $u $defc Drafts [WPCmd PEFolder unread $defc $draftf] [cgi_span "class=sp splc splc2" ""]
424
div_folder $thispage $c $f $u $defc Sent [WPCmd PEFolder unread $defc [lindex [WPCmd PEConfig varget default-fcc] 0]] [cgi_span "class=sp splc splc3" ""]
426
if {[info exists _wp(spamfolder)]} {
427
set current [current_context $thispage $c [wpSpecialFolder $c $f] $defc Junk]
428
cgi_division class="[context_class $current]" {
429
cgi_put [cgi_span "xclass=left" [folder_link $current $thispage $defc Junk $u [WPCmd PEFolder unread $defc $_wp(spamfolder)] [cgi_span "class=sp splc splc4" ""]]]
430
cgi_put [cgi_span "class=right" [empty_link $current Junk $defc]]
434
set current [current_context $thispage $c [wpSpecialFolder $c $f] $defc Trash]
435
cgi_division class="[context_class $current]" id=targetTrash {
436
set trashf [lindex [WPCmd PEConfig varget trash-folder] 0]
437
cgi_put [cgi_span class=left [folder_link $current $thispage $defc Trash $u [WPCmd PEFolder unread $defc $trashf] [cgi_span "class=sp splc splc5" id=targetTrashIcon [cgi_span [cgi_nbspace]]]]]
438
cgi_put [cgi_span class=right [empty_link $current Trash $defc]]
439
if {0 == [string compare browse $thispage] && [string compare Trash $f]} {
440
lappend ddtargets [list targetTrash $defc $trashf]
443
cgi_division class="wap fld" {
444
cgi_put [cgi_nbspace]
447
cgi_division class="[wpSelectedClass "0 == [string compare $thispage contacts]" 0 "fld"]" id=targetContacts {
449
cgi_put [cgi_url "[cgi_span "class=sp splc splc6" ""][cgi_span Contacts]" $cUrl title="Contact List" class=wap [onClick $cUrl]]
450
if {0 == [string compare browse $thispage]} {
451
if {0 == [catch {WPCmd PEAddress books} booklist]} {
452
set tAFargs "\{books:\["
454
foreach b $booklist {
455
regsub -all {'} [lindex $b 1] {\'} bname
456
append tAFargs "${comma}\{book:[lindex $b 0],name:'$bname'\}"
460
append tAFargs "\]\}"
465
# pass address book list
466
cgi_puts "<script>setDragTarget('targetContacts',takeAddressFrom,$tAFargs);</script>"
469
cgi_division class="fld" {
470
cgi_put [cgi_nbspace]
472
cgi_division class="ftitle bld" {
473
cgi_put "Recent Folders"
476
if {[catch {WPSessionState left_column_folders} fln]} {
477
set fln $_wp(fldr_cache_def)
482
foreach fce [getFolderCache] {
483
set fccol [lindex $fce 0]
484
set fcname [lindex $fce 1]
485
if {0 == [catch {WPCmd PEFolder exists $fccol $fcname} result] && $result} {
486
set current [current_context $thispage $c $f $fccol $fcname]
487
set folderID target$nfl
488
cgi_division class="[context_class $current]" id=$folderID {
489
cgi_put [folder_link $current $thispage $fccol $fcname $u [WPCmd PEFolder unread $fccol $fcname] [cgi_span "class=sp splc splc7" id=${folderID}Icon [cgi_span [cgi_nbspace]]]]
490
if {0 == [string compare browse $thispage] && !($c == $fccol && 0 == [string compare $f $fcname])} {
491
lappend ddtargets [list $folderID $fccol $fcname]
496
if {[incr nfl] >= $fln} {
501
cgi_division class="wap fld" {
502
cgi_put [cgi_nbspace]
504
cgi_division class="[wpSelectedClass "0 == [string compare $thispage folders]" 0 "fld"]" {
506
cgi_put [cgi_url "[cgi_span "class=sp splc splc8" ""][cgi_span "View/Manage Folders..."]" $fUrl title="View, Create, Rename, and Delete Folders" class=wap [onClick $fUrl]]
513
cgi_table_data class="spc" rowspan="2" {
514
cgi_put [cgi_span "class=sp trans" "style=height:2px;width:5px;" [cgi_span " "]]
517
cgi_table_data width="100%" valign="top" {
518
# pay not attention to the man behind the curtain
519
cgi_table class="wap content" cellpadding="0" cellspacing="0" {
522
cgi_table_data id=topToolbar class=wap {
523
cgi_anchor_name toolbar
524
uplevel 1 $menubar_top
528
# display page content
530
cgi_table_data height="100%" valign="top" {
531
cgi_division id=alpineContent {
544
cgi_table class="toolbarTbl" cellpadding="0" cellspacing="0" {
547
cgi_table_data class="wap txt" {
548
cgi_put [cgi_nbspace]
555
cgi_table_data id=bottomToolbar class=wap valign="bottom" {
556
uplevel 1 $menubar_bottom
561
cgi_table_data id=ftrContent colspan="3" class="wap footer" align="center" {
562
set ft "Powered by [cgi_url Alpine "http://www.washington.edu/alpine/" target="_blank"] - [cgi_copyright] 2007 University of Washington"
563
if {0 == [string compare browse $thispage]} {
564
append ft " - [cgi_url "HTML Version" "$_wp(serverpath)/$_wp(appdir)/wp.tcl"]"
567
if {[info exists _wp(comments)] && [lsearch {browse view} $thispage] >= 0} {
568
append ft " - [cgi_url "Comments?" "mailto?to=$_wp(comments)&pop=browse/$c/[WPPercentQuote $f]"]"
577
if {[info exists ddtargets]} {
579
foreach t $ddtargets {
580
regsub -all {'} [lindex $t 2] {\'} fn
581
cgi_puts "setDragTarget('[lindex $t 0]',dragOntoFolder,{c:'[lindex $t 1]',f:'$fn'});"
587
proc setCurrentFolder {_c _f _u} {
594
# verify current collection/folder
595
if {[catch {WPCmd PEFolder current} curfold]} {
596
error [list _action browse "cannot determine default folder: $curfold"]
598
set curc [lindex $curfold 0]
599
set curf [lindex $curfold 1]
602
# "current" folder's context
608
if {0 == [string length $f]} {
612
set defc [WPCmd PEFolder defaultcollection]
614
# open a different folder?
615
if {!($c == $curc && 0 == [string compare $f $curf])} {
616
# BUG: DEAL WITH AUTHENTICATION around open below
618
# weed out special use folders
619
if {0 == $c && 0 == [string compare -nocase $f inbox]} {
624
switch -regexp -- $f {
627
catch {WPCmd set pre_draft_folder [WPCmd PEFolder current]}
628
set pf [lindex [WPCmd PEConfig varget postponed-folder] 0]
629
if {[string compare $curf $pf]} {
632
if {[WPCmd PEFolder exists $c $pf] <= 0} {
633
WPCmd PEFolder create $c $pf
636
WPCmd PEInfo statmsg $result
642
set pf [lindex [WPCmd PEConfig varget trash-folder] 0]
643
if {[string compare $curf $pf]} {
646
if {[WPCmd PEFolder exists $c "$pf"] <= 0} {
647
WPCmd PEFolder create $c "$pf"
650
WPCmd PEInfo statmsg $result
655
if {[info exists _wp(spamfolder)]} {
657
set pf $_wp(spamfolder)
658
if {[string compare $curf $pf]} {
661
if {[WPCmd PEFolder exists $c $pf] <= 0} {
662
WPCmd PEFolder create $c $pf
665
WPCmd PEInfo statmsg $result
674
set pf [lindex [WPCmd PEConfig varget default-fcc] 0]
675
if {[string compare $curf $pf]} {
678
if {[WPCmd PEFolder exists $c $pf] <= 0} {
679
WPCmd PEFolder create $c $pf
682
WPCmd PEInfo statmsg $result
695
if {[info exists truef]} {
696
if {[catch {eval WPCmd PEMailbox open [list $c $truef]} reason]} {
699
# do_broach handled this: WPCmd PEInfo statmsg "$f opened with [WPCmd PEMailbox messagecount] messages"
701
if {![info exists mode]} {
705
if {[catch {WPCmd PEMailbox trashdeleted current} result]} {
706
WPCmd PEInfo statmsg "Detete FAILURE: $result"
711
# verify $c $f (and $u if present) exists
712
if {!($c == 0 && 0 == [string compare -nocase inbox $f])} {
713
if {[catch {WPCmd PEFolder exists $c $f} result]} {
714
WPCmd PEInfo statmsg "Cannot test $f for existance: $result"
715
} elseif {$result <= 0} {
716
WPCmd PEInfo statmsg "Folder $f in collection $c does not exist"
720
if {$u > 0 && [catch {WPCmd PEMessage $u number} result]} {
721
WPCmd PEInfo statmsg "Message $u does not exist: $result"
726
proc wpFolderMode {c f} {
727
if {$c == [WPCmd PEFolder defaultcollection]} {
728
switch -exact -- $f {
729
Drafts { return draft }
732
Trash { return trash }
739
proc wpInitPageFraming {_u _n _mc _ppg _pn _pt} {
747
set focused [WPCmd PEMailbox focus]
750
set pt [expr {$mc / $ppg}]
754
} elseif {$mc % $ppg} {
759
set nth [WPCmd PEMailbox messagecount before $n]
766
set pn [expr {$nth / $ppg}]
771
set n [expr {(($pn - 1) * $ppg) + 1}]
773
set n [WPCmd PEMailbox next [WPCmd PEMailbox first] $n]
777
set n [WPCmd PEMailbox first]
780
set u [WPCmd PEMailbox uid $n]
788
proc wpHandleAuthException {err c {f ""}} {
791
if {[regexp {^CERTQUERY ([^+]+)\+\+(.*)$} $err dummy server reason]} {
792
return "code:'CERTQUERY',server:\"${server}\",reason:\"${reason}\""
793
} elseif {[regexp {^CERTFAIL ([^+]+)\+\+(.*)$} $err dummy server reason]} {
794
return "code:'CERTFAIL',server:\"${server}\",reason:\"${reason}\""
795
} elseif {[regexp {^NOPASSWD (.*)$} $err dummy server]} {
796
return "code:'NOPASSWD',c:[lindex $c 0],f:\"${f}\",server:\"{${server}/tls}\",reason:\"[lindex $c 1]\",sessid:\"$_wp(sessid)\""
797
} elseif {[regexp {^BADPASSWD (.*)$} $err dummy server]} {
798
return "code:'BADPASSWD',c:[lindex $c 0],f:\"${f}\",server:\"{${server}/tls}\",reason:\"[lindex $c 1]\",sessid:\"$_wp(sessid)\""
804
proc reportAuthException {exp} {
805
cgi_put "processAuthException(\{$exp\});"
808
proc wpSaveMenuJavascript {p c f dc onDone {df ""}} {
810
cgi_put "updateSaveCache(\"$p\",$c,\"$f\",$dc,$onDone,\["
811
foreach {oname oval} [getSaveCache $df] {
816
cgi_put "{fn:\"$oname\",fv:\"$oval\"}"
821
proc wpLiteralFolder {c f} {
824
if {$c == [WPCmd PEFolder defaultcollection]} {
825
switch -exact -- $f {
827
return [lindex [WPCmd PEConfig varget postponed-folder] 0]
830
return [lindex [WPCmd PEConfig varget default-fcc] 0]
833
if {[info exists _wp(spamfolder)]} {
834
return $_wp(spamfolder)
838
return [lindex [WPCmd PEConfig varget trash-folder] 0]
846
proc wpSpecialFolder {c f} {
849
if {$c == [WPCmd PEFolder defaultcollection]} {
850
if {0 == [string compare $f [lindex [WPCmd PEConfig varget postponed-folder] 0]]} {
854
if {0 == [string compare $f [lindex [WPCmd PEConfig varget default-fcc] 0]]} {
857
if {[info exists _wp(spamfolder)]} {
858
if {0 == [string compare $f $_wp(spamfolder)]} {
862
if {0 == [string compare $f [lindex [WPCmd PEConfig varget trash-folder] 0]]} {