[pLog-svn] r7142 - plog/branches/lifetype-1.2/class/action

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Oct 26 15:58:47 EDT 2011


Author: jondaley
Date: 2011-10-26 15:58:47 -0400 (Wed, 26 Oct 2011)
New Revision: 7142

Modified:
   plog/branches/lifetype-1.2/class/action/commentaction.class.php
Log:
hrm - this constructor wasn't ever called, since it had the wrong name...  And once the validator was actually called, it turns out it wasn't a good one to call, since postCommentLink doesn't currently pass in the parentId anyway.  Two templates use this function, when they could really use the permalink instead.  I thought some templates had implemented posting comments as replies to other comments?

Modified: plog/branches/lifetype-1.2/class/action/commentaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/commentaction.class.php	2011-10-26 19:20:46 UTC (rev 7141)
+++ plog/branches/lifetype-1.2/class/action/commentaction.class.php	2011-10-26 19:58:47 UTC (rev 7142)
@@ -21,13 +21,16 @@
     	var $_articleId;
         var $_parentId;
 
-		function ViewArticleAction( $actionInfo, $request )
+		function CommentAction( $actionInfo, $request )
         {
 			$this->BlogAction( $actionInfo, $request );
-			
+
+                // TODO: current postCommentLink() functions do not add a parent ID to the URL,
+                // so I'm thinking no one is actually using this function?
+            
 			// data validation
 			$this->registerFieldValidator( "articleId", new IntegerValidator());
-			$this->registerFieldValidator( "parentId", new IntegerValidator());			
+			$this->registerFieldValidator( "parentId", new IntegerValidator(), true);
             $this->setValidationErrorView( new ErrorView( $this->_blogInfo, "error_incorrect_article_id" ));
         }
 



More information about the pLog-svn mailing list