[pLog-svn] r6478 - plog/branches/lifetype-1.2/class/action
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Sat May 24 15:18:22 EDT 2008
Author: jondaley
Date: 2008-05-24 15:18:22 -0400 (Sat, 24 May 2008)
New Revision: 6478
Modified:
plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php
Log:
validate optional date field. deny html in names
Modified: plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php 2008-05-24 19:17:39 UTC (rev 6477)
+++ plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php 2008-05-24 19:18:22 UTC (rev 6478)
@@ -32,12 +32,13 @@
$this->BlogAction( $actionInfo, $request );
$this->registerFieldValidator( "articleId", new IntegerValidator(), true );
- $this->registerFieldValidator( "articleName", new StringValidator(), true );
+ $this->registerFieldValidator( "articleName", new StringValidator( false ), true );
$this->registerFieldValidator( "postCategoryId", new IntegerValidator(), true );
- $this->registerFieldValidator( "postCategoryName", new StringValidator(), true );
+ $this->registerFieldValidator( "postCategoryName", new StringValidator( false ), true );
$this->registerFieldValidator( "userId", new IntegerValidator(), true );
$this->registerFieldValidator( "userName", new UsernameValidator(), true );
-
+ $this->registerFieldValidator( "Date", new IntegerValidator(), true );
+
$this->setValidationErrorView( new ErrorView( $this->_blogInfo, "error_fetching_article" ));
}
@@ -50,7 +51,7 @@
$this->_articleId = $this->_request->getValue( "articleId" );
$this->_articleName = $this->_request->getValue( "articleName" );
// find some other additional parameters and use some 'null' values
- // in casuse they're empty
+ // in case they're empty
$this->_categoryId = $this->_request->getValue( "postCategoryId", -1 );
$this->_categoryName = $this->_request->getValue( "postCategoryName" );
$this->_userId = $this->_request->getValue( "userId", -1 );
More information about the pLog-svn
mailing list