Taxonomy menu seems suboptimal: taxonomy_menu($may_cache)

First:

  else {
    if (is_numeric(arg(3))) {

Why not just an elseif() ?

Second:

    if (is_numeric(arg(3))) {

Will hit in for ALL urls with a number on place 3, seems rather nasty to me. Why not check for more?

CommentFileSizeAuthor
#1 taxonomy_menu_more_precise541 byteschx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Status: Active » Needs review
FileSize
541 bytes
Bèr Kessels’s picture

Tested, but not benchmarked.
This should speed up things a little though.

But a -1 on this one, there is still an else and an if inside that, instead of an elseif

Bèr

drumm’s picture

Status: Needs review » Fixed

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)