You are here

function finder_ahah in Finder 6

Menu callback; get finder ahah output.

Parameters

$finder_id: The finder ID.

$display: the type of display ('page', or 'block).

$path: URL encoded path substitute.

Return value

Finder ahah output in JSON format.

1 string reference to 'finder_ahah'
finder_menu in ./finder.module
Implementation of hook_menu().

File

./finder.module, line 628
The finder module.

Code

function finder_ahah($finder_id, $display, $path) {
  if ($finder_id) {
    $finder = finder_load($finder_id);
    if ($finder) {

      // fix the path for any scripts that might call $_GET['q']
      $_GET['q'] = urldecode($path);

      // force the json'd finder output to hide_args
      $finder->settings['advanced']['hide_args'] = 1;
      drupal_json(array(
        'status' => TRUE,
        'data' => finder_view($finder, $display, TRUE),
      ));
      exit;
    }
  }
  drupal_json(array(
    'data' => '',
  ));
  exit;
}