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

mark at devel.lifetype.net mark at devel.lifetype.net
Tue Jul 1 01:42:15 EDT 2008


Author: mark
Date: 2008-07-01 01:42:15 -0400 (Tue, 01 Jul 2008)
New Revision: 6689

Modified:
   plog/branches/lifetype-1.2/class/action/rssaction.class.php
Log:
Use the TemplateNameValidator() here.

Modified: plog/branches/lifetype-1.2/class/action/rssaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/rssaction.class.php	2008-07-01 05:41:15 UTC (rev 6688)
+++ plog/branches/lifetype-1.2/class/action/rssaction.class.php	2008-07-01 05:42:15 UTC (rev 6689)
@@ -2,7 +2,7 @@
 
 	lt_include( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
     lt_include( PLOG_CLASS_PATH."class/view/rssview.class.php" );	
-    lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/data/validator/templatenamevalidator.class.php" );
     lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
 
 
@@ -25,12 +25,7 @@
 			
 			$this->registerFieldValidator( "categoryId", new IntegerValidator(), true );
 			$this->registerFieldValidator( "userId", new IntegerValidator(), true );			
-			
-			// create a StringValidator and add an extra rule to make sure that the input string contains only
-			// alphanumeric characters
-			$profileValidator = new StringValidator();
-			$profileValidator->addRule( new RegexpRule( "^([a-zA-Z0-9]*)$" ));
-			$this->registerFieldValidator( "profile", $profileValidator, true );
+			$this->registerFieldValidator( "profile", new TemplateNameValidator());
 
 			// generate a dummy view with nothing in it to signal an error
 			$view = new RssView( $this->_blogInfo, RSS_VIEW_DEFAULT_PROFILE );



More information about the pLog-svn mailing list