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

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Mon Jun 30 15:02:17 EDT 2008


Author: jondaley
Date: 2008-06-30 15:02:17 -0400 (Mon, 30 Jun 2008)
New Revision: 6685

Modified:
   plog/branches/lifetype-1.2/class/action/resourceserveraction.class.php
Log:
use blogname validator and domainname validator.  If last revision needs to be reverted for not supporting CJK stuff - we should add a ChainedValidator here to take out the HTML or something...

Modified: plog/branches/lifetype-1.2/class/action/resourceserveraction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/resourceserveraction.class.php	2008-06-30 19:01:31 UTC (rev 6684)
+++ plog/branches/lifetype-1.2/class/action/resourceserveraction.class.php	2008-06-30 19:02:17 UTC (rev 6685)
@@ -13,6 +13,8 @@
     lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresources.class.php" );	
 	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/validator/domainvalidator.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/validator/blognamevalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );	
 
     /**
@@ -43,10 +45,8 @@
 			$this->registerFieldValidator( "albumId", new IntegerValidator(), true );
 			$this->registerFieldValidator( "albumName", new StringValidator( false ), true );
 			$this->registerFieldValidator( "blogId", new IntegerValidator(), true );
-                // TODO: are these next two the right validators?
-                // why not blognamevalidator and blogdomainvalidator?
-			$this->registerFieldValidator( "blogDomain", new StringValidator( false ), true );
-			$this->registerFieldValidator( "blogName", new StringValidator( false ), true );
+			$this->registerFieldValidator( "blogDomain", new DomainValidator(), true );
+			$this->registerFieldValidator( "blogName", new BlogNameValidator(), true );
 			$this->registerFieldValidator( "userId", new IntegerValidator(), true );
 			$this->registerFieldValidator( "blogUserName", new UsernameValidator(), true );
 			



More information about the pLog-svn mailing list