Opened 18 years ago
Closed 18 years ago
#3902 closed defect (bug) (fixed)
wp_title shouldn't use category_name if cat is also specified,
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | trivial | Version: | 2.1.2 |
Component: | Optimization | Keywords: | category wp_title duplicate query optimisation has-patch commit |
Focuses: | Cc: |
Description
A very simple patch. In wp_title(), we test to see if a 'cat' is supplied, generating a title based on that. The next block of code adds an unnecessary database call if 'category_name' is supplied, even if 'cat' was also supplied. We should just ignore the second block of code if we've already determined the cat title from the 'cat' var.
The patch simply adds 'else' to the second block. I can't think of any circumstances where this would be a problem. If the category_name and cat vars didn't map to the same title anyway, there would be bigger problems.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Don't test category_name for wp_title is we've already tested cat