mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-19 08:02:59 +02:00
Cosmetic: make get_comment_post_key function more readable.
git-svn-id: http://piwigo.org/svn/trunk@2027 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -30,8 +30,18 @@
|
||||
function get_comment_post_key($image_id)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$time = time();
|
||||
return $time.':'.hash_hmac('md5', $time.':'.$image_id, $conf['secret_key'] );
|
||||
|
||||
return sprintf(
|
||||
'%s:%s',
|
||||
$time,
|
||||
hash_hmac(
|
||||
'md5',
|
||||
$time.':'.$image_id,
|
||||
$conf['secret_key']
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//returns string action to perform on a new comment: validate, moderate, reject
|
||||
|
||||
Reference in New Issue
Block a user