[Phpslash-commit] CVS: phpslash-ft/class Comment.class,1.43,1.44
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2003-03-20 18:29:09
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv8199/phpslash-ft/class Modified Files: Comment.class Log Message: When saving a comment, the user_id is always saved. Index: Comment.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Comment.class,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** Comment.class 4 Mar 2003 21:54:31 -0000 1.43 --- Comment.class 20 Mar 2003 18:29:06 -0000 1.44 *************** *** 253,257 **** } ! if($ary['author_realname']) { $ary['name'] = $ary['author_realname']; $ary['email'] = $ary['url']; --- 253,257 ---- } ! if(!$ary['name']) { $ary['name'] = $ary['author_realname']; $ary['email'] = $ary['url']; *************** *** 675,687 **** } ! if (!$this->perm->have_perm("commentChangeName")) { ! if(($this->auth->auth['uid']) AND ($this->auth->auth['uid'] != "nobody")) { ! $ary['user_id'] = $this->auth->auth['uid']; ! } else { ! $ary['user_id'] = Author::getId('nobody'); ! } ! } ! $ary = $this->prepare($ary); /* fork in the road: if comment_id doesn't exist then we add, else we update */ --- 675,689 ---- } ! if(($this->auth->auth['uid']) AND ($this->auth->auth['uid'] != "nobody")) { ! $ary['user_id'] = $this->auth->auth['uid']; ! } else { ! $ary['user_id'] = Author::getId('nobody'); ! } ! $ary = $this->prepare($ary); + + if($ary['name'] == $this->auth->auth['dname']) { + $ary['name'] = ''; + } /* fork in the road: if comment_id doesn't exist then we add, else we update */ |