All pastes #332055 Raw Edit

Stuff

public text v1 · immutable
#332055 ·published 2007-01-29 18:33 UTC
rendered paste body
    $keys = strlen($keys) ? '/'. $keys : '';
    foreach (module_implements('search') as $name) {
      $title = module_invoke($name, 'search', 'name');
      $items[] = array('path' => 'search/'. $name . $keys, 'title' => $title,
        'callback' => 'search_view',
        'callback arguments' => array($name),
        // The search module only returns a title when the user is allowed to
        // access that particular search type.
        'access' => user_access('search content') && $title,
        'type' => MENU_LOCAL_TASK,
      );
      if (arg(1) && $name == arg(1)) {
        $items[] = array('path'=> 'search/'. $name, type menucallback , copy other from from above
      }
    }