Commit 86559d42 authored by kiko%async.com.br's avatar kiko%async.com.br

Bug 65316: Typos on edit*.cgi. Change use of PutTrailer() (and the

default output, in certain cases) in the edit pages. Patch by Vlad Dascalu <jocuri@softhome.net>, r=kiko, a=justdave
parent 58cee6fc
...@@ -152,6 +152,10 @@ sub EmitFormElements ($$$$$) ...@@ -152,6 +152,10 @@ sub EmitFormElements ($$$$$)
# #
# Displays a text like "a.", "a or b.", "a, b or c.", "a, b, c or d." # Displays a text like "a.", "a or b.", "a, b or c.", "a, b, c or d."
# #
# XXX This implementation of PutTrailer outputs a default link back to the
# query page instead of the index, which is inconsistent with other
# PutTrailer() implementations.
#
sub PutTrailer (@) sub PutTrailer (@)
{ {
...@@ -475,9 +479,14 @@ if ($action eq 'new') { ...@@ -475,9 +479,14 @@ if ($action eq 'new') {
print "OK, done.<p>\n"; print "OK, done.<p>\n";
if ($product) { if ($product) {
PutTrailer("<A HREF=\"editcomponents.cgi?product=" . url_quote($product) . "\">edit</A> more components or <A HREF=\"editcomponents.cgi?product=". url_quote($product) . "&action=add\">Add</A> another component"); PutTrailer("<a href=\"editcomponents.cgi?product=" .
url_quote($product) . "\">edit</a> more components",
"<a href=\"editcomponents.cgi?product=". url_quote($product) .
"&action=add\">add</a> another component");
} else { } else {
PutTrailer("<A HREF=\"editcomponents.cgi\">edit</A> more components or <A HREF=\"editcomponents.cgi?action=add\">Add</A> another component"); PutTrailer("<a href=\"editcomponents.cgi\">edit</a> more components",
"<a href=\"editcomponents.cgi?action=add\">add</a>" .
"another component");
} }
exit; exit;
} }
......
...@@ -73,7 +73,7 @@ sub ShowError ($) ...@@ -73,7 +73,7 @@ sub ShowError ($)
sub PutTrailer (@) sub PutTrailer (@)
{ {
my (@links) = ("<a href=\"./\">Back to the Main Bugs Page</a>", @_); my (@links) = ("Back to the <a href=\"./\">index</a>", @_);
my $count = $#links; my $count = $#links;
my $num = 0; my $num = 0;
...@@ -271,7 +271,7 @@ if ($action eq 'changeform') { ...@@ -271,7 +271,7 @@ if ($action eq 'changeform') {
PutTrailer("<a href=editgroups.cgi>Back to group list</a>"); PutTrailer("back to the <a href=\"editgroups.cgi\">group list</a>");
exit; exit;
} }
...@@ -326,7 +326,7 @@ probably want it to be usable for bugs, in which case you should leave this chec ...@@ -326,7 +326,7 @@ probably want it to be usable for bugs, in which case you should leave this chec
print "products\" option will prevent this and make the group become "; print "products\" option will prevent this and make the group become ";
print "visible only when its controls have been added to a product.<P>\n"; print "visible only when its controls have been added to a product.<P>\n";
PutTrailer("<a href=editgroups.cgi>Back to the group list</a>"); PutTrailer("back to the <a href=\"editgroups.cgi\">group list</a>");
exit; exit;
} }
...@@ -409,8 +409,8 @@ if ($action eq 'new') { ...@@ -409,8 +409,8 @@ if ($action eq 'new') {
"FROM products"); "FROM products");
} }
print "OK, done.<p>\n"; print "OK, done.<p>\n";
PutTrailer("<a href=\"editgroups.cgi?action=add\">Add another group</a>", PutTrailer("<a href=\"editgroups.cgi?action=add\">add</a> another group",
"<a href=\"editgroups.cgi\">Back to the group list</a>"); "back to the <a href=\"editgroups.cgi\">group list</a>");
exit; exit;
} }
...@@ -558,9 +558,9 @@ if ($action eq 'delete') { ...@@ -558,9 +558,9 @@ if ($action eq 'delete') {
"records in the database which refer to it. All such records " . "records in the database which refer to it. All such records " .
"must be removed or altered to remove the reference to this " . "must be removed or altered to remove the reference to this " .
"group before the group can be deleted."); "group before the group can be deleted.");
print "<A HREF=\"editgroups.cgi?action=del&group=$gid\">" . print "<a href=\"editgroups.cgi?action=del&group=$gid\">" .
"View the list of which records are affected</A><BR>"; "View</a> the list of which records are affected.<br>";
PutTrailer("<a href=editgroups.cgi>Back to group list</a>"); PutTrailer("back to the <a href=\"editgroups.cgi\">group list</a>");
exit; exit;
} }
...@@ -572,7 +572,7 @@ if ($action eq 'delete') { ...@@ -572,7 +572,7 @@ if ($action eq 'delete') {
print "<B>Group $gid has been deleted.</B><BR>"; print "<B>Group $gid has been deleted.</B><BR>";
PutTrailer("<a href=editgroups.cgi>Back to group list</a>"); PutTrailer("back to the <a href=\"editgroups.cgi\">group list</a>");
exit; exit;
} }
...@@ -666,7 +666,7 @@ if ($action eq 'postchanges') { ...@@ -666,7 +666,7 @@ if ($action eq 'postchanges') {
SendSQL("UPDATE groups SET last_changed = NOW() WHERE id = $gid"); SendSQL("UPDATE groups SET last_changed = NOW() WHERE id = $gid");
print "Done.<p>\n"; print "Done.<p>\n";
} }
PutTrailer("<a href=editgroups.cgi>Back to the group list</a>"); PutTrailer("back to the <a href=\"editgroups.cgi\">group list</a>");
exit; exit;
} }
......
...@@ -31,6 +31,10 @@ my $localtrailer = "<A HREF=\"editkeywords.cgi\">edit</A> more keywords"; ...@@ -31,6 +31,10 @@ my $localtrailer = "<A HREF=\"editkeywords.cgi\">edit</A> more keywords";
# #
# Displays a text like "a.", "a or b.", "a, b or c.", "a, b, c or d." # Displays a text like "a.", "a or b.", "a, b or c.", "a, b, c or d."
# #
# XXX This implementation of PutTrailer outputs a default link back to
# the query page instead of the index, which is inconsistent with other
# PutTrailer() implementations.
#
sub PutTrailer (@) sub PutTrailer (@)
{ {
...@@ -242,7 +246,8 @@ if ($action eq 'new') { ...@@ -242,7 +246,8 @@ if ($action eq 'new') {
unlink "data/versioncache"; unlink "data/versioncache";
print "OK, done.<p>\n"; print "OK, done.<p>\n";
PutTrailer("<A HREF=\"editkeywords.cgi\">edit</A> more keywords or <A HREF=\"editkeywords.cgi?action=add\">add</a> another keyword"); PutTrailer("<a href=\"editkeywords.cgi\">edit</a> more keywords",
"<a href=\"editkeywords.cgi?action=add\">add</a> another keyword");
exit; exit;
} }
......
...@@ -433,7 +433,9 @@ if ($action eq 'new') { ...@@ -433,7 +433,9 @@ if ($action eq 'new') {
unlink "data/versioncache"; unlink "data/versioncache";
print "OK, done.<p>\n"; print "OK, done.<p>\n";
PutTrailer($localtrailer, "<a href=\"editcomponents.cgi?action=add&product=" . url_quote($product) . "\">add</a> components to this new product."); PutTrailer($localtrailer,
"<a href=\"editcomponents.cgi?action=add&product=" .
url_quote($product) . "\">add</a> components to this new product");
exit; exit;
} }
......
...@@ -207,9 +207,10 @@ sub EmitFormElements ($$$$) ...@@ -207,9 +207,10 @@ sub EmitFormElements ($$$$)
sub PutTrailer (@) sub PutTrailer (@)
{ {
my (@links) = ("Back to the <A HREF=\"./\">index</A>"); my (@links) = ("Back to the <a href=\"./\">index</a>");
if($editall && Bugzilla::Auth->can_edit) { if($editall && Bugzilla::Auth->can_edit) {
push(@links, "<A HREF=\"editusers.cgi?action=add\">Add a new user</A>"); push(@links,
"<a href=\"editusers.cgi?action=add\">add</a> a new user");
} }
push(@links, @_); push(@links, @_);
...@@ -489,10 +490,11 @@ if ($action eq 'new') { ...@@ -489,10 +490,11 @@ if ($action eq 'new') {
SendSQL("SELECT last_insert_id()"); SendSQL("SELECT last_insert_id()");
my ($newuserid) = FetchSQLData(); my ($newuserid) = FetchSQLData();
print "To change ${user}'s permissions, go back and <a href=\"editusers.cgi?action=edit&user=" . url_quote($user)."\">edit this user</A>"; print "To change ${user}'s permissions, go back and " .
"<a href=\"editusers.cgi?action=edit&user=" . url_quote($user) .
"\">edit</a> this user.";
print "<p>\n"; print "<p>\n";
PutTrailer($localtrailer, PutTrailer($localtrailer);
"<a href=\"editusers.cgi?action=add\">add</a> another user.");
exit; exit;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment