You are here

function advanced_help_search_get_keys in Advanced Help 7

Helper function for grabbing search keys. Function is missing in D7.

http://api.drupal.org/api/function/search_get_keys/6

1 call to advanced_help_search_get_keys()
advanced_help_search_view in ./advanced_help.module
Page callback for advanced help search.

File

./advanced_help.module, line 172
Pluggable system to provide advanced help facilities for Drupal and modules.

Code

function advanced_help_search_get_keys() {
  static $return;
  if (!isset($return)) {

    // Extract keys as remainder of path
    // Note: support old GET format of searches for existing links.
    $path = explode('/', $_GET['q'], 4);
    $keys = empty($_REQUEST['keys']) ? '' : $_REQUEST['keys'];
    $return = count($path) == 4 ? $path[3] : $keys;
  }
  return $return;
}