Closed Bug 988744 Opened 12 years ago Closed 12 years ago

orangefactor template_before_process should check $file before checking user settings

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: dkl)

Details

Attachments

(1 file)

currently the orange factor extension does: > return unless $user && $user->id && $user->settings; > return unless $user->settings->{'orange_factor'}->{'value'} eq 'on'; > > # in the header we just need to set the var, > # to ensure the css and javascript get included > if ($file eq 'bug/show-header.html.tmpl' > || $file eq 'bug/edit.html.tmpl') { this can result in two unnecessary database queries to load the user's settings (eg. when rendering the xml version of a page). $file should be checked first, then $user->settings.
Assignee: nobody → dkl
Status: NEW → ASSIGNED
Attached patch 988744_1.patch — — Splinter Review
Attachment #8397857 - Flags: review?(glob)
Comment on attachment 8397857 [details] [diff] [review] 988744_1.patch Review of attachment 8397857 [details] [diff] [review]: ----------------------------------------------------------------- r=glob
Attachment #8397857 - Flags: review?(glob) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git 07ae825..5ee0201 4.2 -> 4.2
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
Component: Extensions: OrangeFactor → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: