diff options
author | plegall <plg@piwigo.org> | 2007-05-28 08:13:30 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2007-05-28 08:13:30 +0000 |
commit | c0a9781ff8f6580c55070482940dae1582fe2869 (patch) | |
tree | 283d8a6a63054976b2af7e36dc2af774397e5b7a | |
parent | 70ad3c68fc9e3a149961a298e33d1a9130df1bcc (diff) |
Cosmetic: make get_comment_post_key function more readable.
git-svn-id: http://piwigo.org/svn/trunk@2027 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | include/functions_comment.inc.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/functions_comment.inc.php b/include/functions_comment.inc.php index 1a894b69d..15a72d2f6 100644 --- a/include/functions_comment.inc.php +++ b/include/functions_comment.inc.php @@ -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 |