function boxes_create_hash in Boxes 7
Same name and namespace in other branches
- 6 boxes.module \boxes_create_hash()
Create a hash for a block id.
1 call to boxes_create_hash()
- boxes_block_view in ./
boxes.module - Implements hook_block_view().
File
- ./
boxes.module, line 819 - Core functionality for boxes module.
Code
function boxes_create_hash($identifier) {
global $user;
$boxes = boxes_block_info();
$hash = dechex(crc32($user->sid . microtime()));
while (isset($boxes["{$identifier}-{$hash}"])) {
$hash = dechex(crc32($user->sid . microtime()));
}
return $hash;
}