[pLog-svn] r2482 - plog/trunk/class/action

jondaley at devel.plogworld.net jondaley at devel.plogworld.net
Mon Sep 19 02:34:18 GMT 2005


Author: jondaley
Date: 2005-09-19 02:34:17 +0000 (Mon, 19 Sep 2005)
New Revision: 2482

Modified:
   plog/trunk/class/action/addcommentaction.class.php
Log:
removed double include.  fixed locale string.  filterAllHTML already does the trim for us

Modified: plog/trunk/class/action/addcommentaction.class.php
===================================================================
--- plog/trunk/class/action/addcommentaction.class.php	2005-09-19 02:23:51 UTC (rev 2481)
+++ plog/trunk/class/action/addcommentaction.class.php	2005-09-19 02:34:17 UTC (rev 2482)
@@ -14,7 +14,6 @@
     include_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
     include_once( PLOG_CLASS_PATH."class/bayesian/bayesianfiltercore.class.php" );
 	include_once( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
-	include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
 
     /**
      * \ingroup Action
@@ -57,7 +56,7 @@
 			$this->registerFieldValidator( "commentText", new StringValidator());
 			$this->_form->setFieldErrorMessage( "commentText", $this->_locale->tr("error_comment_without_text"));
 			$this->registerFieldValidator( "userUrl", new HttpUrlValidator(), true );
-			$this->_form->setFieldErrorMessage( "userUrl", $this->_locale->tr("Invalid URL" ));
+			$this->_form->setFieldErrorMessage( "userUrl", $this->_locale->tr("invalid_url" ));
 			$view = new ErrorView( $this->_blogInfo );
 			$view->setErrorMessage( "There has been an error validating the data!" );
 			$this->setValidationErrorView( $view );
@@ -83,7 +82,7 @@
             }
             $this->_userName  = Textfilter::filterAllHTML($this->_request->getValue( "userName" ));
             $this->_commentText = trim($this->_request->getValue( "commentText" ));
-            $this->_commentTopic = trim(Textfilter::filterAllHTML($this->_request->getValue( "commentTopic" )));
+            $this->_commentTopic = Textfilter::filterAllHTML($this->_request->getValue( "commentTopic" ));
             // remove all weird stuff from the comment text
             $tf = new TextFilter();
             $this->_commentText = $tf->xhtmlize($tf->filterHTML( $this->_commentText ));




More information about the pLog-svn mailing list