2006-01-13 19:57:25 +03:00
|
|
|
#!/usr/bin/perl -w
|
1999-07-23 22:39:31 +04:00
|
|
|
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
1998-06-17 01:43:24 +04:00
|
|
|
#
|
1999-11-02 02:33:56 +03:00
|
|
|
# The contents of this file are subject to the Netscape Public
|
|
|
|
# License Version 1.1 (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/
|
1998-06-17 01:43:24 +04:00
|
|
|
#
|
1999-11-02 02:33:56 +03:00
|
|
|
# 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.
|
1998-06-17 01:43:24 +04:00
|
|
|
#
|
|
|
|
# The Original Code is the Bonsai CVS tool.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is Netscape Communications
|
1999-11-02 02:33:56 +03:00
|
|
|
# Corporation. Portions created by Netscape are
|
|
|
|
# Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
# Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-10-19 02:55:01 +04:00
|
|
|
use strict;
|
|
|
|
|
|
|
|
# Shut up misguided -w warnings about "used only once". "use vars" just
|
|
|
|
# doesn't work for me.
|
|
|
|
|
|
|
|
sub sillyness {
|
|
|
|
my $zz;
|
|
|
|
$zz = $::TreeID;
|
2004-12-01 07:25:22 +03:00
|
|
|
$zz = $::FORM{'id'};
|
1999-10-19 02:55:01 +04:00
|
|
|
}
|
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
require 'CGI.pl';
|
1998-06-17 01:43:24 +04:00
|
|
|
|
2004-12-01 07:25:22 +03:00
|
|
|
&LoadCheckins();
|
2004-09-22 22:44:38 +04:00
|
|
|
|
2004-12-01 07:25:22 +03:00
|
|
|
my $form_id = &ExpectCheckinId($::FORM{'id'});
|
2004-09-22 22:44:38 +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>";
|
2004-12-01 07:25:22 +03:00
|
|
|
print "<td><INPUT NAME=$i VALUE=\"" . &value_quote($info->{$i}) .
|
1999-07-23 22:39:31 +04:00
|
|
|
"\"></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'});
|
2004-09-22 22:44:38 +04:00
|
|
|
my $infolog = $info->{'log'} || "";
|
1999-07-23 22:39:31 +04:00
|
|
|
|
|
|
|
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>
|
2004-09-22 22:44:38 +04:00
|
|
|
<td><TEXTAREA NAME=log ROWS=10 COLS=80>$infolog</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))) {
|
2004-12-01 03:40:18 +03:00
|
|
|
my $q = &url_quote($info->{$i});
|
1999-07-23 22:39:31 +04:00
|
|
|
print qq{<INPUT TYPE=HIDDEN NAME=orig$i VALUE="$q">\n};
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
2004-12-01 07:25:22 +03:00
|
|
|
print "<INPUT TYPE=HIDDEN NAME=id VALUE=\"$form_id\">";
|
1999-07-23 22:39:31 +04:00
|
|
|
|
2004-12-01 07:25:22 +03:00
|
|
|
print "<INPUT TYPE=HIDDEN NAME=treeid VALUE=\"$::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
|
|
|
|