1999-07-23 22:39:31 +04:00
|
|
|
#!/usr/bonsaitools/bin/perl -w
|
|
|
|
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
1998-06-17 01:43:24 +04:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
require 'CGI.pl';
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
LoadCheckins();
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
my $info = eval("\\%" . $::FORM{'id'});
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
print "Content-type: text/html
|
1998-06-17 01:43:24 +04:00
|
|
|
|
|
|
|
<HTML>
|
|
|
|
<TITLE>Say the magic word.</TITLE>
|
|
|
|
<H1>Edit a checkin.</H1>
|
|
|
|
|
|
|
|
Congratulations, you have found the hidden edit-a-checkin feature. Of course,
|
|
|
|
you need to know the magic word to do anything from here.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<FORM method=get action=\"doeditcheckin.cgi\">
|
|
|
|
<TABLE>
|
|
|
|
<tr>
|
|
|
|
<td align=right><B>Password:</B></td>
|
|
|
|
<td><INPUT NAME=password TYPE=password></td>
|
|
|
|
</tr><tr>
|
|
|
|
<td align=right><B>When:</B></td>
|
1999-07-23 22:39:31 +04:00
|
|
|
<td><INPUT NAME=datestring VALUE=\"" .
|
|
|
|
value_quote(MyFmtClock($info->{'date'})) . "\">
|
1998-06-17 01:43:24 +04:00
|
|
|
</td></tr>
|
1999-07-23 22:39:31 +04:00
|
|
|
";
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
if (!exists $info->{'notes'}) {
|
|
|
|
$info->{'notes'} = "";
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
foreach my $i ('person', 'dir', 'files', 'notes') {
|
|
|
|
print "<tr><td align=right><B>$i:</B></td>";
|
|
|
|
print "<td><INPUT NAME=$i VALUE=\"" . value_quote($info->{$i}) .
|
|
|
|
"\"></td></tr>";
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
sub CheckString {
|
|
|
|
my ($value) = (@_);
|
|
|
|
if ($value) {
|
|
|
|
return "CHECKED";
|
1998-06-17 01:43:24 +04:00
|
|
|
} else {
|
1999-07-23 22:39:31 +04:00
|
|
|
return "";
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
my $isopen = CheckString($info->{'treeopen'});
|
|
|
|
my $isclosed = CheckString(!$info->{'treeopen'});
|
|
|
|
|
|
|
|
print qq{
|
1998-06-17 01:43:24 +04:00
|
|
|
<tr><td align=right><b>Tree state:</b></td>
|
1999-07-23 22:39:31 +04:00
|
|
|
<td><INPUT TYPE=radio NAME=treeopen VALUE=1 $isopen>Open
|
1998-06-17 01:43:24 +04:00
|
|
|
</td></tr><tr><td></td>
|
1999-07-23 22:39:31 +04:00
|
|
|
<td><INPUT TYPE=radio NAME=treeopen VALUE=0 $isclosed>Closed
|
1998-06-17 01:43:24 +04:00
|
|
|
</td></tr><tr>
|
|
|
|
<td align=right valign=top><B>Log message:</B></td>
|
1999-07-23 22:39:31 +04:00
|
|
|
<td><TEXTAREA NAME=log ROWS=10 COLS=80>$info->{'log'}</TEXTAREA></td></tr>
|
1998-06-17 01:43:24 +04:00
|
|
|
</table>
|
|
|
|
<INPUT TYPE=CHECKBOX NAME=nukeit>Check this box to blow away this checkin entirely.<br>
|
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
<INPUT TYPE=SUBMIT VALUE=Submit>
|
|
|
|
};
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
foreach my $i (sort(keys(%$info))) {
|
|
|
|
my $q = value_quote($info->{$i});
|
|
|
|
print qq{<INPUT TYPE=HIDDEN NAME=orig$i VALUE="$q">\n};
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
print "<INPUT TYPE=HIDDEN NAME=id VALUE=\"$::FORM{'id'}\">";
|
|
|
|
|
|
|
|
print "<INPUT TYPE=HIDDEN NAME=treeid VALUE=\"" . value_quote($treeid) . "\">";
|
1998-06-17 01:43:24 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
print "</TABLE></FORM>";
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
PutsTrailer();
|
1998-06-17 01:43:24 +04:00
|
|
|
|