Hello,<br>&nbsp;&nbsp; There is a problem with this change.&nbsp; Some templates use the &quot;userName&quot; field for the commentor&#39;s name.&nbsp; 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,  &lt;<a href="mailto:jondaley@devel.lifetype.net" target="_blank">jondaley@devel.lifetype.net</a>&gt; 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>
 &nbsp; plog/branches/lifetype-1.2/class/action/addcommentaction.class.php<br>
Log:<br>
removed old variable. &nbsp;use username validator for usernames. &nbsp;allow html in comment text. &nbsp;The xhtmlize filter will remove bad stuff for us? &nbsp;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 &nbsp;2008-05-24 19:18:22 UTC (rev 6478)<br>
+++ plog/branches/lifetype-1.2/class/action/addcommentaction.class.php &nbsp;2008-05-24 19:19:11 UTC (rev 6479)<br>
@@ -30,7 +30,6 @@<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;var $_articleId;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; var $_blogId;<br>
- &nbsp; &nbsp; &nbsp; &nbsp;var $_opId;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; var $_userName;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; var $_userEmail;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; var $_userUrl;<br>
@@ -70,9 +69,9 @@<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;_form-&gt;setFieldErrorMessage( &quot;parentId&quot;, $this-&gt;_locale-&gt;tr(&quot;error_incorrect_article_id&quot; ));<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;registerFieldValidator( &quot;userEmail&quot;, new EmailValidator(), true );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;_form-&gt;setFieldErrorMessage( &quot;userEmail&quot;, $this-&gt;_locale-&gt;tr(&quot;error_incorrect_email_address&quot; ));<br>
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;registerFieldValidator( &quot;userName&quot;, new StringValidator());<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;registerFieldValidator( &quot;userName&quot;, new UsernameValidator());<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;_form-&gt;setFieldErrorMessage( &quot;userName&quot;, $this-&gt;_locale-&gt;tr(&quot;error_comment_without_name&quot; ));<br>
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;registerFieldValidator( &quot;commentText&quot;, new StringValidator());<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;registerFieldValidator( &quot;commentText&quot;, new StringValidator( true ));<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;_form-&gt;setFieldErrorMessage( &quot;commentText&quot;, $this-&gt;_locale-&gt;tr(&quot;error_comment_without_text&quot;));<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;registerFieldValidator( &quot;userUrl&quot;, new HttpUrlValidator(), true );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;_form-&gt;setFieldErrorMessage( &quot;userUrl&quot;, $this-&gt;_locale-&gt;tr(&quot;invalid_url&quot; ));<br>
@@ -91,7 +90,6 @@<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;_articleId = $this-&gt;_request-&gt;getValue( &quot;articleId&quot; );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;_blogId &nbsp; &nbsp;= $this-&gt;_request-&gt;getValue( &quot;blogId&quot; );<br>
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&gt;_opId &nbsp; &nbsp; &nbsp;= $this-&gt;_request-&gt;getValue( &quot;op&quot; );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;_parentId &nbsp;= $this-&gt;_request-&gt;getValue( &quot;parentId&quot; );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if( $this-&gt;_parentId == null || $this-&gt;_parentId == &quot;&quot; )<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;_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>