All pastes #332090 Raw Edit

Something

public php v1 · immutable
#332090 ·published 2007-01-29 18:47 UTC
rendered paste body
  else if (arg(0) == 'search') {    // To remember the user's search keywords when switching across tabs,    // we dynamically add the keywords to the search tabs' paths.    $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) && $keys) {        drupal_goto('search/'. $name . $keys);      }    }