Fix for bug 142645: Tells users how to get a CVS account or file a bug report and attach their changes.

This commit is contained in:
myk%mozilla.org 2002-05-08 01:49:07 +00:00
Родитель 61a6f2f985
Коммит 9b1caf1526
4 изменённых файлов: 42 добавлений и 3 удалений

Просмотреть файл

@ -101,6 +101,8 @@ my $READ_CVS_SERVER = $config->get('READ_CVS_SERVER');
my $READ_CVS_USERNAME = $config->get('READ_CVS_USERNAME');
my $READ_CVS_PASSWORD = $config->get('READ_CVS_PASSWORD');
my $WRITE_CVS_SERVER = $config->get('WRITE_CVS_SERVER');
my $WEB_BASE_URI = $config->get('WEB_BASE_URI');
my $WEB_BASE_PATH = $config->get('WEB_BASE_PATH');
# Store the home directory so we can get back to it after changing directories
# in certain places in the code.
@ -152,6 +154,7 @@ if ($action eq "edit")
}
elsif ($action eq "review")
{
ValidateFile();
ReviewChanges();
}
elsif ($action eq "commit")
@ -181,6 +184,11 @@ sub ValidateFile
my $file = $request->param("file");
# If the file name starts with the base URI for files on the web site, it is
# a URL and needs to be converted into a file path, which we do by removing
# the base URI and adding the base path.
if ($file =~ s/^\Q$WEB_BASE_URI\E(.*)$/$1/i) { $file = $WEB_BASE_PATH . $file }
# Collapse multiple consecutive slashes (i.e. dir//file.txt)
# into a single slash.
$file =~ s:/{2,}:/:;
@ -197,6 +205,11 @@ sub ValidateFile
# Note: we don't need to validate further because CVS will tell us
# whether or not the filename is valid.
# Construct a URL to the file if possible.
my $url = $file;
if ($url =~ s/^\Q$WEB_BASE_PATH\E(.*)$/$1/i) { $vars->{'file_url'} = $WEB_BASE_URI . $url }
}
sub ValidateUsername

Просмотреть файл

@ -27,7 +27,13 @@
<body bgcolor="white" color="black">
<big><b>Doctor - committed <em>[% file FILTER html %]</em></b></big>
<big><b>Doctor - committed <em>
[% IF file_url %]
<a href="[% file_url FILTER html %]">[% file_url FILTER html %]</a>
[% ELSE %]
[% file FILTER html %]
[% END %]
</em></b></big>
[% IF at_sign %]
<p style="color: red;"><big><b>

Просмотреть файл

@ -27,7 +27,15 @@
<body bgcolor="white" color="black">
<big><b>Doctor - edit <em>[% file FILTER html %]</em></b></big><br><br>
<big><b>Doctor - edit <em>
[% IF file_url %]
<a href="[% file_url FILTER html %]">[% file_url FILTER html %]</a>
[% ELSE %]
[% file FILTER html %]
[% END %]
</em></b></big>
<br><br>
<form method="post" action="doctor.cgi">

Просмотреть файл

@ -27,7 +27,13 @@
<body bgcolor="white" color="black">
<big><b>Doctor - review changes to <em>[% file FILTER html %]</em></b></big>
<big><b>Doctor - review changes to <em>
[% IF file_url %]
<a href="[% file_url FILTER html %]">[% file_url FILTER html %]</a>
[% ELSE %]
[% file FILTER html %]
[% END %]
</em></b></big>
<p>
You are making the following changes:
@ -71,6 +77,12 @@
<input type="submit" name="action" value="edit"> the file some more.
</p>
<p>
Don't have a CVS account?
<a href="http://bugzilla.mozilla.org/enter_bug.cgi?reporter=myk%40mozilla.org&product=mozilla.org&component=CVS+Account+Request&version=unspecified&rep_platform=All&op_sys=All&short_desc=webtree+CVS+account+for+%3Cyour+name+here%3E+-+%3Cyour+email+address+here%3E&comment=%3CEnter+a+description+of+what+you+would+like+to+edit+on+the+web+site+here.++Note%0D%0Athat+you+need+someone+who+already+has+access+to+vouch+for+you.%3E">File a bug report about getting one</a>
or <a href="http://bugzilla.mozilla.org/enter_bug.cgi?reporter=myk%40mozilla.org&product=Documentation&version=unspecified&rep_platform=All&op_sys=All&priority=--&bug_severity=normal&assigned_to=&cc=&bug_file_loc=[% file_url FILTER html %]&short_desc=%3CSummarize+your+changes+here.%3E&comment=%3CDescribe+your+changes+here+in+more+detail.++After+you+commit+this+bug+report%2C%0D%0Aclick+the+%22Create+Attachment%22+link+to+add+the+changes+to+the+report+as+an%0D%0Aattachment.%3E">file a bug report about your changes</a>, then add them to the report as an attachment.
</p>
</form>
</body>