Hello,<br> There is a problem with this change. Some templates use the "userName" field for the commentor's name. So if I enter my first and last name (with a space in between) the comment will not be committed.<br>
<br>--Paul<br><br><div class="gmail_quote">On Sat, May 24, 2008 at 12:19 PM, <<a href="mailto:jondaley@devel.lifetype.net" target="_blank">jondaley@devel.lifetype.net</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Author: jondaley<br>
Date: 2008-05-24 15:19:11 -0400 (Sat, 24 May 2008)<br>
New Revision: 6479<br>
<br>
Modified:<br>
plog/branches/lifetype-1.2/class/action/addcommentaction.class.php<br>
Log:<br>
removed old variable. use username validator for usernames. allow html in comment text. The xhtmlize filter will remove bad stuff for us? Need to verify<br>
<br>
Modified: plog/branches/lifetype-1.2/class/action/addcommentaction.class.php<br>
===================================================================<br>
--- plog/branches/lifetype-1.2/class/action/addcommentaction.class.php 2008-05-24 19:18:22 UTC (rev 6478)<br>
+++ plog/branches/lifetype-1.2/class/action/addcommentaction.class.php 2008-05-24 19:19:11 UTC (rev 6479)<br>
@@ -30,7 +30,6 @@<br>
<br>
var $_articleId;<br>
var $_blogId;<br>
- var $_opId;<br>
var $_userName;<br>
var $_userEmail;<br>
var $_userUrl;<br>
@@ -70,9 +69,9 @@<br>
$this->_form->setFieldErrorMessage( "parentId", $this->_locale->tr("error_incorrect_article_id" ));<br>
$this->registerFieldValidator( "userEmail", new EmailValidator(), true );<br>
$this->_form->setFieldErrorMessage( "userEmail", $this->_locale->tr("error_incorrect_email_address" ));<br>
- $this->registerFieldValidator( "userName", new StringValidator());<br>
+ $this->registerFieldValidator( "userName", new UsernameValidator());<br>
$this->_form->setFieldErrorMessage( "userName", $this->_locale->tr("error_comment_without_name" ));<br>
- $this->registerFieldValidator( "commentText", new StringValidator());<br>
+ $this->registerFieldValidator( "commentText", new StringValidator( true ));<br>
$this->_form->setFieldErrorMessage( "commentText", $this->_locale->tr("error_comment_without_text"));<br>
$this->registerFieldValidator( "userUrl", new HttpUrlValidator(), true );<br>
$this->_form->setFieldErrorMessage( "userUrl", $this->_locale->tr("invalid_url" ));<br>
@@ -91,7 +90,6 @@<br>
<br>
$this->_articleId = $this->_request->getValue( "articleId" );<br>
$this->_blogId = $this->_request->getValue( "blogId" );<br>
- $this->_opId = $this->_request->getValue( "op" );<br>
$this->_parentId = $this->_request->getValue( "parentId" );<br>
if( $this->_parentId == null || $this->_parentId == "" )<br>
$this->_parentId = 0;<br>
<br>
_______________________________________________<br>
pLog-svn mailing list<br>
<a href="mailto:pLog-svn@devel.lifetype.net" target="_blank">pLog-svn@devel.lifetype.net</a><br>
<a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank">http://limedaley.com/mailman/listinfo/plog-svn</a><br>
</blockquote></div><br>