Bug 577800 (bz-search-init)

Clean up Search.pm's "init" function

RESOLVED FIXED in Bugzilla 4.2

Status

()

Bugzilla
Query/Bug List
--
enhancement
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

3.7.2
Bugzilla 4.2
Dependency tree / graph

Details

Attachments

(1 attachment)

v1
23.74 KB, patch
Max Kanat-Alexander
: review+
Details | Diff | Splinter Review
(Assignee)

Description

8 years ago
There's a lot of stuff that happens before the charts, like specialcharts, special "map_" supptables, etc. That all needs some cleanup.
(Assignee)

Updated

8 years ago
Keywords: meta
(Assignee)

Updated

8 years ago
Alias: bz-search-init
Keywords: meta
(Assignee)

Updated

8 years ago
Depends on: 577803
(Assignee)

Updated

8 years ago
Assignee: query-and-buglist → mkanat
(Assignee)

Updated

8 years ago
Summary: Clean up the top of Search.pm's "init" function → Clean up Search.pm's "init" function
(Assignee)

Updated

8 years ago
Target Milestone: --- → Bugzilla 4.2
(Assignee)

Updated

8 years ago
Depends on: 577805
(Assignee)

Updated

8 years ago
Depends on: 578266
(Assignee)

Updated

8 years ago
Depends on: 578275
(Assignee)

Updated

8 years ago
Depends on: 578278
(Assignee)

Updated

8 years ago
Depends on: 578299
(Assignee)

Updated

8 years ago
Depends on: 578308
(Assignee)

Updated

8 years ago
Depends on: 578602
(Assignee)

Updated

8 years ago
Depends on: 578888
(Assignee)

Updated

8 years ago
Depends on: 578904
(Assignee)

Updated

8 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

8 years ago
Created attachment 457542 [details] [diff] [review]
v1

This completes the cleanup of init by...removing it. :-)

All work is now done in a new accessor, called "sql". I have removed getSQL and changed the existing callers to use "sql" instead. I changed the name partially because the new accessor has significantly different behavior (it actually generates the sql instead of just returning already-generated SQL) and that might throw off some callers that are outside our codebase.

This also cleans up the general positioning of functions inside Search.pm, changes the use of {'user'} to a _user accessor, clearly sections off all the subroutines in the file, and adds a few comments describing functions.
Attachment #457542 - Flags: review+
(Assignee)

Comment 2

8 years ago
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified buglist.cgi
modified collectstats.pl
modified report.cgi
modified whine.pl
modified Bugzilla/Search.pm
modified xt/lib/Bugzilla/Test/Search/FieldTest.pm
Committed revision 7373.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.