function boxes_create_hash in Boxes 6
Same name and namespace in other branches
- 7 boxes.module \boxes_create_hash()
Create a hash for a block id.
1 call to boxes_create_hash()
- boxes_block in ./
boxes.module - Implementation of hook_block().
File
- ./
boxes.module, line 569
Code
function boxes_create_hash($identifier) {
global $user;
$boxes = boxes_block('list');
$hash = dechex(crc32($user->sid . microtime()));
while (isset($boxes["{$identifier}-{$hash}"])) {
$hash = dechex(crc32($user->sid . microtime()));
}
return $hash;
}