finder_ahah
- Versions
- 6--1
finder_ahah($finder_id, $path)
Menu callback; get finder ahah output.
Parameters
$finder_id The finder ID.
$path URL encoded path substitute.
Return value
Finder ahah output in JSON format.
Code
./finder.module, line 615
<?php
function finder_ahah($finder_id, $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, 'ahah')));
exit;
}
}
drupal_json(array('data' => ''));
exit;
}
?>
