]> git.ipfire.org Git - thirdparty/bugzilla.git/commit
this changes makes api_field_* variables lazy
authorDylan Hardison <dylan@hardison.net>
Sun, 18 Dec 2022 21:22:52 +0000 (13:22 -0800)
committerDave Miller <github@justdave.net>
Sun, 18 Dec 2022 21:33:50 +0000 (16:33 -0500)
commit17a80574d362743247c10b8c0b4c594513a6bd82
tree34a5c2a800e10449be62b928b0744234f2b956b7
parentd5d2a848702e1d9843f0e82c2b8106c605b92e6a
this changes makes api_field_* variables lazy

api_field_types and api_field_names rely on values from the
Bugzilla->fields definition. This in turn requires checking the schema
of the bugs table at run time. That means trying to access these when a
database is not configured, or before schema migrations have happened is
an error.

This changes those variables to hold functions (sub refs) that are
comptued when called. The help performance not degrade, we make use of
the Bugzilla::request_cache to only re-compute this once per request.
Bugzilla/WebService/Bug.pm