[Phpslash-commit] CVS: phpslash-ft/public_html comment.php3,1.29,1.30
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2003-02-19 20:20:20
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv29565/phpslash-ft/public_html Modified Files: comment.php3 Log Message: Name used to comment is now saved in the session Index: comment.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/comment.php3,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** comment.php3 23 Jan 2003 19:30:56 -0000 1.29 --- comment.php3 19 Feb 2003 20:20:13 -0000 1.30 *************** *** 22,37 **** $email = $ary['email']; $url = $ary['url']; ! ! if (!empty($ary['cookiebox'])) { ! ! $name = $ary['name']; ! $email = $ary['email']; ! $url = $ary['url']; ! $sess->register("name"); ! $sess->register("email"); ! $sess->register("url"); } ! $cmt = pslNew("Comment",$ary); --- 22,37 ---- $email = $ary['email']; $url = $ary['url']; ! ! if(!empty($ary['name'])) { ! $comment_name = $ary['name']; ! $comment_email = $ary['email']; ! $comment_url = $ary['url']; ! $sess->register("comment_name"); ! $sess->register("comment_email"); ! $sess->register("comment_url"); } ! ! $cmt = pslNew("Comment",$ary); *************** *** 61,66 **** // expire cache for this story_id ! jpcache_gc('string', "-story_id-" . $ary['story_id'], "100"); ! $content .= getMessage($cmt->getMessage()); $comment_ary = $cmt->getCommentArray($id); --- 61,67 ---- // expire cache for this story_id ! if(function_exists('jpcache_gc')) { ! jpcache_gc('string', "-story_id-" . $ary['story_id'], "100"); ! } $content .= getMessage($cmt->getMessage()); $comment_ary = $cmt->getCommentArray($id); *************** *** 88,91 **** --- 89,97 ---- if (empty($ary['parent_id'])) { $ary['parent_id'] = 0; + } + + if ($sess->is_registered("comment_name")) { + $ary['name'] = $comment_name; + $ary['email'] = $comment_email; } |