Closed Bug 162066 Opened 22 years ago Closed 22 years ago

Fix callers of ThrowCodeError to use messages in code-error.html.tmpl

Categories

(Bugzilla :: Bugzilla-General, defect)

2.17
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: gerv, Assigned: gerv)

Details

Attachments

(2 files, 1 obsolete file)

There are six callers of ThrowCodeError. We need to move the strings into the
messages.html.tmpl template for l10n reasons.

Gerv
Attached patch Patch v.1 (obsolete) — Splinter Review
Fix up callers of ThrowCodeError.

Gerv
Status: NEW → ASSIGNED
Summary: Fix callers of ThrowCodeError to use messages.html.tmpl → Fix callers of ThrowCodeError to use messages in code-error.html.tmpl
Target Milestone: --- → Bugzilla 2.18
Comment on attachment 94760 [details] [diff] [review]
Patch v.1

You don't need to html filter the group_bit, but you should filter the various
$field thingys (yes, I know they weren't that way before, but there it was
obvious it wasn't needed - you're making that code more generic here)
Attachment #94760 - Flags: review-
I do need to HTML-filter the group bit, because it comes from a URL param. I'll
add filters for the other stuff.

Gerv
Attached patch Patch v.2Splinter Review
Fixes bbaetz' comments and also changes the order of the parameters to
ThrowCodeError so that they match those to ThrowUserError over in bug 162068.

Gerv
Attachment #94760 - Attachment is obsolete: true
Keywords: patch, review
Comment on attachment 94764 [details] [diff] [review]
Patch v.2

You do check that $v is a number in the regexp above - the error message for
when that fails doesn't print the bit at all. It doesn't really matter, though.

r=bbaetz x2, but you left out the callers in bug_form.pl and
Bugzilla/Search.pm...

Also, it appears that noone is using the third argument to ThrowCodeError -
should that be removed?
Attachment #94764 - Flags: review+
Checked in.

> r=bbaetz x2, but you left out the callers in bug_form.pl and
> Bugzilla/Search.pm...

New patch coming up - thanks.

> Also, it appears that noone is using the third argument to ThrowCodeError -
> should that be removed?

No. It's very useful for debugging, both during development, and if something
weird is happening on someone's Bugzilla. We can get them to trace out useful
variables if they are getting some strange error.

Checking in CGI.pl;
/cvsroot/mozilla/webtools/bugzilla/CGI.pl,v  <--  CGI.pl
new revision: 1.166; previous revision: 1.165
done
Checking in post_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v  <--  post_bug.cgi
new revision: 1.60; previous revision: 1.59
done
Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v  <--  process_bug.cgi
new revision: 1.136; previous revision: 1.135
done
Checking in template/en/default/global/code-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl,v
 <--  code-error.html.tmpl
new revision: 1.7; previous revision: 1.6
done

Gerv
Attached patch Patch v2bSplinter Review
This fixes the last two calls bbaetz spotted that I missed.

bbaetz: rubber-stamp?

Gerv
Comment on attachment 95368 [details] [diff] [review]
Patch v2b

Looks fine. You can remove the legacy stuff too, I guess. r=bbaetz x2
Attachment #95368 - Flags: review+
Fixed.

Checking in Bugzilla/Search.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v  <--  Search.pm
new revision: 1.6; previous revision: 1.5
done
Checking in bug_form.pl;
/cvsroot/mozilla/webtools/bugzilla/bug_form.pl,v  <--  bug_form.pl
new revision: 1.101; previous revision: 1.100
done
Checking in template/en/default/global/code-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl,v
 <--  code-error.html.tmpl
new revision: 1.8; previous revision: 1.7
done

Gerv
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: