function webform_protected_downloads_get_hash_details in Webform Protected Downloads 7
Same name and namespace in other branches
- 6 webform_protected_downloads.module \webform_protected_downloads_get_hash_details()
Retrieve details for this hash
Parameters
string $hash:
Return value
void
2 calls to webform_protected_downloads_get_hash_details()
- webform_protected_downloads_download_page in ./
webform_protected_downloads.page.inc - Displays the download page
- webform_protected_downloads_tokens in ./
webform_protected_downloads.module - Implements of hook_tokens().
File
- ./
webform_protected_downloads.module, line 850 - This file contains hook declarations and functions for the Webform Protected Downloads module.
Code
function webform_protected_downloads_get_hash_details($hash) {
$wpd_hash =& drupal_static(__FUNCTION__);
if (!isset($wpd_hash[$hash])) {
$result = db_query("SELECT * FROM {wpd_access_hashes} WHERE hash = :hash", array(
':hash' => $hash,
));
$wpd_hash[$hash] = $result
->fetchObject();
}
return $wpd_hash[$hash];
}