Changeset 12639

Show
Ignore:
Timestamp:
02/22/08 19:22:12 (11 months ago)
Author:
pottedmeat
Message:

Refs #5602. Make search betterest, strongerest, fasterest

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • util/branches/dev/jsdoc/jsdoc.module

    r12638 r12639  
    216216      return; 
    217217    } 
    218     elseif ($object = jsdoc_object_node_load($search)) { 
    219       drupal_goto($object->jsdoc_url); 
    220       return; 
     218    else { 
     219      $query = db_query("SELECT title FROM {node} WHERE type = 'jsdoc_object' AND title LIKE '%%%s%%' GROUP BY BINARY title", $search); 
     220      if (db_num_rows($query) == 1) { 
     221        $object = jsdoc_object_node_load(db_result($query)); 
     222        drupal_goto($object->jsdoc_url); 
     223        return; 
     224      } 
    221225    } 
    222226  }