Closed Bug 519835 Opened 15 years ago Closed 14 years ago

Bugzilla::Product::check_product() should be Bugzilla::Product->check()

Categories

(Bugzilla :: Bugzilla-General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: LpSolit, Assigned: LpSolit)

Details

Attachments

(1 file, 3 obsolete files)

check_product() in Product.pm existed before Object.pm. We should now replace it by Object->check().
Assignee: general → LpSolit
Target Milestone: --- → Bugzilla 3.8
Target Milestone: Bugzilla 4.0 → Bugzilla 4.2
Attached patch patch, v1 (obsolete) — Splinter Review
Attachment #456180 - Flags: review?(mkanat)
Attached patch patch, v1.1 (obsolete) — Splinter Review
now with new({name => ...})
Attachment #456180 - Attachment is obsolete: true
Attachment #456181 - Flags: review?(mkanat)
Attachment #456180 - Flags: review?(mkanat)
Comment on attachment 456181 [details] [diff] [review]
patch, v1.1

Hmm. For the cases like editflagtypes.cgi, I'd rather have an argument to check() that bypasses the Product->check() and goes straight to Object->check.

So, perhaps something like Bugzilla::Product->check({ name => $name, allow_inaccessible => 1 });
Attachment #456181 - Flags: review?(mkanat) → review-
Attached patch patch, v2 (obsolete) — Splinter Review
Attachment #456181 - Attachment is obsolete: true
Attachment #456185 - Flags: review?(mkanat)
Comment on attachment 456185 [details] [diff] [review]
patch, v2

This is fine, except that in the allow_inaccessible case, you don't want to throw the product_access_denied error, so you probably should "if" or "unless" that.
Attachment #456185 - Flags: review?(mkanat) → review+
Flags: approval?
Attached patch patch, v3Splinter Review
Yeah, good idea. Carrying forward r+.
Attachment #456185 - Attachment is obsolete: true
Attachment #456189 - Flags: review+
Status: NEW → ASSIGNED
Flags: approval? → approval+
Target Milestone: Bugzilla 4.2 → Bugzilla 4.0
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified collectstats.pl
modified config.cgi
modified editflagtypes.cgi
modified enter_bug.cgi
modified request.cgi
modified Bugzilla/Bug.pm
modified Bugzilla/Product.pm
modified Bugzilla/User.pm
modified template/en/default/global/user-error.html.tmpl
Committed revision 7287.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Keywords: relnote
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: