コード例 #1
0
/**
 * Store the personal details of a commenting user in a cookie (or delete that cookie)
 *
 * @access public
 * @return null
 */
function serendipity_rememberComment()
{
    global $serendipity;
    if (isset($serendipity['POST']['remember'])) {
        serendipity_rememberCommentDetails(array('url' => $serendipity['POST']['url'], 'name' => $serendipity['POST']['name'], 'email' => $serendipity['POST']['email'], 'remember' => 'checked="checked"'));
    } elseif (isset($serendipity['POST']['comment'])) {
        serendipity_forgetCommentDetails(array('url', 'name', 'email', 'remember'));
    }
}
コード例 #2
0
 function rememberInputs()
 {
     global $serendipity;
     // Remember twitter name value into cookie, if user ordered to, else clear cookie
     if (isset($serendipity['POST']['remember'])) {
         // Remember twitter name, remove leading @ if found
         serendipity_rememberCommentDetails(array('twitter' => ltrim(trim($serendipity['POST']['twitter']), '@')));
     } else {
         serendipity_forgetCommentDetails(array('twitter'));
     }
 }