[pLog-svn] r6502 -plugins/branches/lifetype-1.2/editcomments/class/action

Mark Wu markplace at gmail.com
Thu Jun 5 06:57:30 EDT 2008


Hi Jon:

If the AllowHTML is false, I think we don't need to assign it in
StringValidator Again ... Because the default is "false"

It seems really annoying.

Mark 

> -----Original Message-----
> From: plog-svn-bounces at devel.lifetype.net 
> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of 
> jondaley at devel.lifetype.net
> Sent: Thursday, June 05, 2008 6:50 PM
> To: plog-svn at devel.lifetype.net
> Subject: [pLog-svn] r6502 
> -plugins/branches/lifetype-1.2/editcomments/class/action
> 
> Author: jondaley
> Date: 2008-06-05 06:49:33 -0400 (Thu, 05 Jun 2008) New Revision: 6502
> 
> Modified:
>    
> plugins/branches/lifetype-1.2/editcomments/class/action/adminu
> pdatecommentaction.class.php
> Log:
> commentText needs to allow HTML.  minimally validate date and ip
> 
> Modified: 
> plugins/branches/lifetype-1.2/editcomments/class/action/adminu
> pdatecommentaction.class.php
> ===================================================================
> --- 
> plugins/branches/lifetype-1.2/editcomments/class/action/adminu
> pdatecommentaction.class.php	2008-06-02 16:16:51 UTC (rev 6501)
> +++ 
> plugins/branches/lifetype-1.2/editcomments/class/action/adminu
> pdatecommentaction.class.php	2008-06-05 10:49:33 UTC (rev 6502)
> @@ -37,18 +37,17 @@
>              // articleId is needed, even on a cancel operation
>          $this->registerFieldValidator("articleId", new 
> IntegerValidator());
>          $this->_articleId = $this->_request->getValue( "articleId" );
> -
> +        
>          if($this->_op == "updateComment"){
>              $this->registerFieldValidator("commentId", new 
> IntegerValidator());
> -            $this->registerFieldValidator("commentText", new 
> StringValidator());
> -            $this->registerFieldValidator("authorName", new 
> StringValidator());
> +            $this->registerFieldValidator("commentText", new 
> StringValidator(true));
> +            $this->registerFieldValidator("authorName", new 
> + StringValidator(false));
>              $this->registerFieldValidator("commentStatus", 
> new IntegerValidator());
> -            $this->registerFieldValidator("commentTopic", 
> new StringValidator(), true);
> +            $this->registerFieldValidator("commentTopic", new 
> + StringValidator(false), true);
>              $this->registerFieldValidator("authorEmail", new 
> EmailValidator(), true);
>              $this->registerFieldValidator("authorUrl", new 
> HttpUrlValidator(), true);
> -                // no validation...
> -            $this->registerField("commentDateTime");
> -            $this->registerField("commentIp");
> +            $this->registerFieldValidator("commentDateTime", 
> new StringValidator(false));
> +            $this->registerFieldValidator("commentIp", new 
> + StringValidator(false));
>              
>              $this->_commentId = 
> $this->_request->getValue("commentId");
>              $view = new 
> AdminEditCommentView($this->_blogInfo, $this->_commentId);
> 
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn



More information about the pLog-svn mailing list