Closed Bug 328641 Opened 19 years ago Closed 19 years ago

Make Bugzilla::Util not depend on Bugzilla::Config

Categories

(Bugzilla :: Bugzilla-General, enhancement)

2.23
enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 328642

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file, 1 obsolete file)

Right now Bugzilla::Util depends on Bugzilla::Config for perform_substs and validate_email_syntax. This is a problem because Bugzilla::Util is used all over the place, and more than once I've run into a very long dependency loop because of it. Right now it's blocking my work on bug 328637. (Bugzilla::Config::BugFields will depend on Bugzilla::Field, which uses Bugzilla::Util, which uses Bugzilla::Config, which uses Bugzilla::Config::BugFields.) I think both of these functions could be moved elsewhere. It's possible that perform_substs could even be moved into Bugzilla::Config itself. validate_email_syntax should be fine in Bugzilla::User, I'd imagine, even though it has non-user uses.
Attached patch v1 (obsolete) (deleted) — Splinter Review
This is pretty straightforward. I just move the functions into places where they can live.
Attachment #213243 - Flags: review?(LpSolit)
Attached patch v1.1 (deleted) — Splinter Review
The first version was missing an EXPORT in Bugzilla::Config.
Attachment #213243 - Attachment is obsolete: true
Attachment #213244 - Flags: review?(LpSolit)
Attachment #213243 - Flags: review?(LpSolit)
Comment on attachment 213244 [details] [diff] [review] v1.1 LpSolit pointed out that I'd also have to move format_time. But if anything belongs in Bugzilla::Util, it's really format_time. So I'd rather not move it, and just fix this in a more architecturally-sound way.
Attachment #213244 - Flags: review?(LpSolit)
*** This bug has been marked as a duplicate of 328642 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Target Milestone: Bugzilla 2.24 → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: