function piwik_search_get_keys in Piwik Web Analytics 7
Same name and namespace in other branches
- 7.2 piwik.module \piwik_search_get_keys()
Helper function for grabbing search keys. Function is missing in D7.
http://api.drupal.org/api/function/search_get_keys/6
1 call to piwik_search_get_keys()
- piwik_page_alter in ./
piwik.module - Implementation of hook_page_alter() to insert JavaScript to the appropriate scope/region of the page.
File
- ./
piwik.module, line 302 - Drupal Module: Piwik Adds the required Javascript to the bottom of all your Drupal pages to allow tracking by the Piwik statistics package.
Code
function piwik_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'], 3);
$keys = empty($_REQUEST['keys']) ? '' : $_REQUEST['keys'];
$return = count($path) == 3 ? $path[2] : $keys;
}
return $return;
}