#!/usr/bonsaitools/bin/mysqltcl # -*- Mode: tcl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Netscape Public License # Version 1.0 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://www.mozilla.org/NPL/ # # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the # License for the specific language governing rights and limitations # under the License. # # The Original Code is the Bonsai CVS tool. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are Copyright (C) 1998 # Netscape Communications Corporation. All Rights Reserved. source CGI.tcl Lock LoadCheckins LoadMOTD LoadWhiteboard LoadTreeConfig Unlock if {$treeopen} { set openword Open } else { set openword Closed } puts "Content-type: text/html Refresh: 300
$motd
[html_quote [read_file $filename]]
[html_quote $whiteboard]
" set peoplelist [lsort [array names people]] set query "(| " foreach p $peoplelist { append query "(mail=$p@netscape.com) " set fullname($p) "" set curcontact($p) "" } append query ")" set ldaperror 0 if {[catch {set fid [open "|./data/ldapsearch -b \"o=Netscape Communications Corp.,c=US\" -h $ldapserver -p $ldapport -s sub -S mail \"$query\" mail cn nscpcurcontactinfo" r]} errvar]} { set ldaperror 1 } else { set doingcontactinfo 0 while {[gets $fid line] >= 0} { if {$doingcontactinfo} { if {[regexp -- {^ (.*)$} $line foo n]} { append curcontact($curperson) $n continue } set doingcontactinfo 0 } if {[regexp -- {^mail: (.*)@} $line foo n]} { set curperson $n } elseif {[regexp -- {^cn: (.*)$} $line foo n]} { set fullname($curperson) $n } elseif {[regexp -- {^nscpcurcontactinfo: (.*)$} $line foo n]} { set curcontact($curperson) $n set doingcontactinfo 1 } } if {[catch {close $fid} errvar]} { set ldaperror 1 } } if {$ldaperror} { puts "Can't contact the directory server at $ldapserver:$ldapport -- $errvar" } puts "
Who | What | How to contact | " foreach p $peoplelist { if {[info exists closedcheckin($p)]} { set extra " ([llength $closedcheckin($p)] while tree closed!)" } else { set extra "" } puts "|
---|---|---|---|
$fullname($p) | $p | [llength $people($p)] [Pluralize change [llength $people($p)]]$extra | " puts "$curcontact($p) |
"
puts "Show all checkins.
"
if {[cequal $treeid default]} {
puts ""
} else {
puts ""
}
puts "Send mail to \"the hook\".
"
} else {
puts "Nobody seems to have made any changes since the tree opened."
}
set cvsqueryurl "cvsqueryform.cgi?cvsroot=$treeinfo($treeid,repository)&module=$treeinfo($treeid,module)"
if {[clength $treeinfo($treeid,branch)] > 0} {
append cvsqueryurl "&branch=$treeinfo($treeid,branch)"
}
puts "