function _ajax_comments_cache_key in AJAX Comments 7
Create the key for caching a comment form.
2 calls to _ajax_comments_cache_key()
- ajax_comments_reply in ./
ajax_comments.module - Callback for clicking "reply". Note: $pid is an optional parameter. This functionality is utilized by the "Add new comment" link on pages where there is no default comment form (comment_form_location is COMMENT_FORM_SEPARATE_PAGE)
- ajax_comments_submit_js in ./
ajax_comments.module - Builds the comment.
File
- ./
ajax_comments.module, line 668 - AJAX comments module file.
Code
function _ajax_comments_cache_key($nid, $pid) {
$key = 'ajax_comments_reply_form-' . $nid . '-' . $pid;
if (!user_is_anonymous()) {
$key .= '-' . session_id();
}
else {
$key .= '-' . ip_address();
}
return $key;
}