You are here

function asset_search_wizard_results in Asset 5.2

Same name and namespace in other branches
  1. 6 contrib/asset_search/asset_search.module \asset_search_wizard_results()

Menu callback for asset/wizard/method/search/<type>/<value>

Parameters

$type - search type:

$value - search value(s):

1 string reference to 'asset_search_wizard_results'
asset_search_menu in contrib/asset_search/asset_search.module
Implementation of hook_menu().

File

contrib/asset_search/asset_search.module, line 135

Code

function asset_search_wizard_results($type, $value) {
  $args = func_get_args();
  $type = array_shift($args);
  $value = array_shift($args);
  $types = asset_search_types();

  // if the search value is a url, in the case of an RSS feed, the arg() function
  // will split it into many arguments on the /.  Since these will be passed to
  // the function as additional args, we can just join them back together to
  // get the url string back.
  if ($value == 'http:' || $value == 'https:') {
    $value = implode('/', $args);
  }
  $channel = asset_search_fetch($type, $value, TRUE);
  $items = $channel['items'];
  if ($channel['TITLE']) {
    $output = '<h3>' . $channel['TITLE'] . '</h3>';
  }
  $output .= theme('asset_search_wizard_browse', $asset, $items);
  return theme('asset_wizard_page', $output);
}