From 86559d4282d5dfaceab273ac2faf42dbcca8226b Mon Sep 17 00:00:00 2001 From: "kiko%async.com.br" <> Date: Sat, 27 Sep 2003 06:47:07 +0000 Subject: 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 , r=kiko, a=justdave --- editcomponents.cgi | 13 +++++++++++-- editgroups.cgi | 20 ++++++++++---------- editkeywords.cgi | 7 ++++++- editproducts.cgi | 4 +++- editusers.cgi | 12 +++++++----- 5 files changed, 37 insertions(+), 19 deletions(-) diff --git a/editcomponents.cgi b/editcomponents.cgi index 018c89cdf..539da47a5 100755 --- a/editcomponents.cgi +++ b/editcomponents.cgi @@ -151,6 +151,10 @@ sub EmitFormElements ($$$$$) # # 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 (@) @@ -475,9 +479,14 @@ if ($action eq 'new') { print "OK, done.

\n"; if ($product) { - PutTrailer("edit more components or Add another component"); + PutTrailer("edit more components", + "add another component"); } else { - PutTrailer("edit more components or Add another component"); + PutTrailer("edit more components", + "add" . + "another component"); } exit; } diff --git a/editgroups.cgi b/editgroups.cgi index a283d0501..e793f296a 100755 --- a/editgroups.cgi +++ b/editgroups.cgi @@ -73,7 +73,7 @@ sub ShowError ($) sub PutTrailer (@) { - my (@links) = ("Back to the Main Bugs Page", @_); + my (@links) = ("Back to the index", @_); my $count = $#links; my $num = 0; @@ -271,7 +271,7 @@ if ($action eq 'changeform') { - PutTrailer("Back to group list"); + PutTrailer("back to the group list"); exit; } @@ -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 "visible only when its controls have been added to a product.

\n"; - PutTrailer("Back to the group list"); + PutTrailer("back to the group list"); exit; } @@ -409,8 +409,8 @@ if ($action eq 'new') { "FROM products"); } print "OK, done.

\n"; - PutTrailer("Add another group", - "Back to the group list"); + PutTrailer("add another group", + "back to the group list"); exit; } @@ -558,9 +558,9 @@ if ($action eq 'delete') { "records in the database which refer to it. All such records " . "must be removed or altered to remove the reference to this " . "group before the group can be deleted."); - print "" . - "View the list of which records are affected
"; - PutTrailer("Back to group list"); + print "" . + "View the list of which records are affected.
"; + PutTrailer("back to the group list"); exit; } @@ -572,7 +572,7 @@ if ($action eq 'delete') { print "Group $gid has been deleted.
"; - PutTrailer("Back to group list"); + PutTrailer("back to the group list"); exit; } @@ -666,7 +666,7 @@ if ($action eq 'postchanges') { SendSQL("UPDATE groups SET last_changed = NOW() WHERE id = $gid"); print "Done.

\n"; } - PutTrailer("Back to the group list"); + PutTrailer("back to the group list"); exit; } diff --git a/editkeywords.cgi b/editkeywords.cgi index 8ef11aee0..073dfbb9d 100755 --- a/editkeywords.cgi +++ b/editkeywords.cgi @@ -30,6 +30,10 @@ my $localtrailer = "edit more keywords"; # # 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 (@) @@ -242,7 +246,8 @@ if ($action eq 'new') { unlink "data/versioncache"; print "OK, done.

\n"; - PutTrailer("edit more keywords or add another keyword"); + PutTrailer("edit more keywords", + "add another keyword"); exit; } diff --git a/editproducts.cgi b/editproducts.cgi index 55089d9ae..1782a74b8 100755 --- a/editproducts.cgi +++ b/editproducts.cgi @@ -433,7 +433,9 @@ if ($action eq 'new') { unlink "data/versioncache"; print "OK, done.

\n"; - PutTrailer($localtrailer, "add components to this new product."); + PutTrailer($localtrailer, + "add components to this new product"); exit; } diff --git a/editusers.cgi b/editusers.cgi index ecd179793..823035fe5 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -207,9 +207,10 @@ sub EmitFormElements ($$$$) sub PutTrailer (@) { - my (@links) = ("Back to the index"); + my (@links) = ("Back to the index"); if($editall && Bugzilla::Auth->can_edit) { - push(@links, "Add a new user"); + push(@links, + "add a new user"); } push(@links, @_); @@ -489,10 +490,11 @@ if ($action eq 'new') { SendSQL("SELECT last_insert_id()"); my ($newuserid) = FetchSQLData(); - print "To change ${user}'s permissions, go back and edit this user"; + print "To change ${user}'s permissions, go back and " . + "edit this user."; print "

\n"; - PutTrailer($localtrailer, - "add another user."); + PutTrailer($localtrailer); exit; } -- cgit v1.2.3-24-g4f1b