[pLog-svn] r5675 - plog/branches/lifetype-1.2/class/action/admin
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Wed Jul 18 16:47:04 EDT 2007
Author: oscar
Date: 2007-07-18 16:47:04 -0400 (Wed, 18 Jul 2007)
New Revision: 5675
Modified:
plog/branches/lifetype-1.2/class/action/admin/adminaddpostaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminchangeblogstatusaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminchangecommentsstatusaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminchangegalleryitemsalbumaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminchangelinkscategoryaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminchangepostscategoryaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminchangepostsstatusaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminchangetrackbacksstatusaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminchangeuserstatusaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletearticlecategoryaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeleteblogaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeleteblogcategoryaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeleteblogtemplateaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletebloguserpermissionsaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletecommentaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletecustomfieldsaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletegalleryitemsaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeleteglobalarticlecategoryaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletelinkaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletelinkcategoryaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletelocalesaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletepermissionsaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletepostaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletereferreraction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletetemplatesaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeletetrackbackaction.class.php
plog/branches/lifetype-1.2/class/action/admin/admindeleteusersaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminupdateeditblogaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminupdatepostaction.class.php
Log:
Added additional validation to the elements of an array when validated via ArrayValidator as per Matt's comments.
Modified: plog/branches/lifetype-1.2/class/action/admin/adminaddpostaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminaddpostaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/adminaddpostaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -27,7 +27,7 @@
// for data validation purposes, posts must have at least a topic, an intro text, and a category
$this->registerFieldValidator( "postText", new StringValidator());
$this->registerFieldValidator( "postTopic", new StringValidator());
- $this->registerFieldValidator( "postCategories", new ArrayValidator());
+ $this->registerFieldValidator( "postCategories", new ArrayValidator( new IntegerValidator()));
$this->registerFieldValidator( "globalArticleCategoryId", new IntegerValidator(), true );
$view = new AdminNewPostView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_adding_post"));
Modified: plog/branches/lifetype-1.2/class/action/admin/adminchangeblogstatusaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminchangeblogstatusaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/adminchangeblogstatusaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -26,7 +26,7 @@
function AdminChangeBlogStatusAction( $actionInfo, $request )
{
$this->AdminAction( $actionInfo, $request );
- $this->registerFieldValidator( "blogIds", new ArrayValidator());
+ $this->registerFieldValidator( "blogIds", new ArrayValidator( new IntegerValidator()));
$this->registerFieldValidator( "blogStatus", new IntegerValidator() );
$view = new AdminSiteBlogsListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_incorrect_blog_id"));
Modified: plog/branches/lifetype-1.2/class/action/admin/adminchangecommentsstatusaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminchangecommentsstatusaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/adminchangecommentsstatusaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -28,7 +28,7 @@
{
$this->AdminAction( $actionInfo, $request );
$this->registerFieldValidator( "articleId", new IntegerValidator());
- $this->registerFieldValidator( "commentIds", new ArrayValidator());
+ $this->registerFieldValidator( "commentIds", new ArrayValidator( new IntegerValidator()));
$this->registerFieldValidator( "commentStatus", new IntegerValidator());
$view = new AdminArticleCommentsListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_updating_comments"));
Modified: plog/branches/lifetype-1.2/class/action/admin/adminchangegalleryitemsalbumaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminchangegalleryitemsalbumaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/adminchangegalleryitemsalbumaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -38,8 +38,8 @@
$this->_errorMessage = "";
// data validation
- $this->registerFieldValidator( "resourceIds", new ArrayValidator(), true );
- $this->registerFieldValidator( "albumIds", new ArrayValidator(), true );
+ $this->registerFieldValidator( "resourceIds", new ArrayValidator( new IntegerValidator()), true );
+ $this->registerFieldValidator( "albumIds", new ArrayValidator( new IntegerValidator()), true );
$this->registerFieldValidator( "galleryAlbumId", new IntegerValidator(), true );
$view = new AdminResourcesListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_no_resources_selected"));
Modified: plog/branches/lifetype-1.2/class/action/admin/adminchangelinkscategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminchangelinkscategoryaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/adminchangelinkscategoryaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -26,7 +26,7 @@
{
$this->AdminAction( $actionInfo, $request );
- $this->registerFieldValidator( "linkIds", new ArrayValidator());
+ $this->registerFieldValidator( "linkIds", new ArrayValidator( new IntegerValidator()));
$this->registerFieldValidator( "linkCategoryId", new IntegerValidator());
$view = new AdminLinksListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_no_links_selected"));
Modified: plog/branches/lifetype-1.2/class/action/admin/adminchangepostscategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminchangepostscategoryaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/adminchangepostscategoryaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -5,6 +5,7 @@
lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
lt_include( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/arrayvalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
/**
* \ingroup Action
@@ -25,8 +26,8 @@
function AdminChangePostsCategoryAction( $actionInfo, $request )
{
$this->AdminAction( $actionInfo, $request );
- $this->registerFieldValidator( "postIds", new ArrayValidator());
- $this->registerFieldValidator( "postCategories", new ArrayValidator() );
+ $this->registerFieldValidator( "postIds", new ArrayValidator( new IntegerValidator()));
+ $this->registerFieldValidator( "postCategories", new ArrayValidator( new IntegerValidator()));
$view = new AdminPostsListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_incorrect_article_id"));
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/adminchangepostsstatusaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminchangepostsstatusaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/adminchangepostsstatusaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -26,8 +26,8 @@
function AdminChangePostsStatusAction( $actionInfo, $request )
{
$this->AdminAction( $actionInfo, $request );
- $this->registerFieldValidator( "postIds", new ArrayValidator());
- $this->registerFieldValidator( "postStatus", new IntegerValidator() );
+ $this->registerFieldValidator( "postIds", new ArrayValidator( new IntegerValidator()));
+ $this->registerFieldValidator( "postStatus", new IntegerValidator());
$view = new AdminPostsListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_incorrect_article_id"));
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/adminchangetrackbacksstatusaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminchangetrackbacksstatusaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/adminchangetrackbacksstatusaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -28,7 +28,7 @@
{
$this->AdminAction( $actionInfo, $request );
$this->registerFieldValidator( "articleId", new IntegerValidator());
- $this->registerFieldValidator( "trackbackIds", new ArrayValidator());
+ $this->registerFieldValidator( "trackbackIds", new ArrayValidator( new IntegerValidator()));
$this->registerFieldValidator( "trackbackStatus", new IntegerValidator());
$view = new AdminArticleTrackbacksListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_updating_trackbacks"));
Modified: plog/branches/lifetype-1.2/class/action/admin/adminchangeuserstatusaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminchangeuserstatusaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/adminchangeuserstatusaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -26,7 +26,7 @@
function AdminChangeUserStatusAction( $actionInfo, $request )
{
$this->AdminAction( $actionInfo, $request );
- $this->registerFieldValidator( "userIds", new ArrayValidator());
+ $this->registerFieldValidator( "userIds", new ArrayValidator( new IntegerValidator()));
$this->registerFieldValidator( "userStatus", new IntegerValidator() );
$view = new AdminSiteUsersListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_incorrect_user"));
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletearticlecategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletearticlecategoryaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletearticlecategoryaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -32,7 +32,7 @@
if( $this->_mode == "deleteArticleCategory" )
$this->registerFieldValidator( "categoryId", new IntegerValidator());
else
- $this->registerFieldValidator( "categoryIds", new ArrayValidator());
+ $this->registerFieldValidator( "categoryIds", new ArrayValidator( new IntegerValidator()));
$view = new AdminArticleCategoriesListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_incorrect_category_id"));
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeleteblogaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeleteblogaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeleteblogaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -24,7 +24,7 @@
// set up the data validation stuff
$this->_op = $actionInfo->getActionParamValue();
if( $this->_op == "deleteBlogs" )
- $this->registerFieldvalidator( "blogIds", new ArrayValidator());
+ $this->registerFieldvalidator( "blogIds", new ArrayValidator( new IntegerValidator()));
else
$this->registerFieldValidator( "blogId", new IntegerValidator());
$view = new AdminSiteBlogsListView( $this->_blogInfo );
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeleteblogcategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeleteblogcategoryaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeleteblogcategoryaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -32,7 +32,7 @@
if( $this->_mode == "deleteBlogCategory" )
$this->registerFieldValidator( "categoryId", new IntegerValidator());
else
- $this->registerFieldValidator( "categoryIds", new ArrayValidator());
+ $this->registerFieldValidator( "categoryIds", new ArrayValidator( new IntegerValidator()));
$view = new AdminBlogCategoriesListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_incorrect_blog_category"));
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeleteblogtemplateaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeleteblogtemplateaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeleteblogtemplateaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -25,7 +25,7 @@
if( $this->_op == "deleteBlogTemplate" )
$this->registerFieldValidator( "templateId", new StringValidator());
else
- $this->registerFieldValidator( "templateIds", new ArrayValidator());
+ $this->registerFieldValidator( "templateIds", new ArrayValidator( new StringValidator()));
$view = new AdminBlogTemplateSetsListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_no_templates_selected" ));
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletebloguserpermissionsaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletebloguserpermissionsaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletebloguserpermissionsaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -28,7 +28,7 @@
if( $this->_op == "deleteBlogUserPermissions" )
$this->registerFieldValidator( "userId", new IntegerValidator());
else
- $this->registerFieldValidator( "userIds", new ArrayValidator());
+ $this->registerFieldValidator( "userIds", new ArrayValidator( new IntegerValidator()));
$view = new AdminBlogUsersListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_no_users_selected" ));
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletecommentaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletecommentaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletecommentaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -33,7 +33,7 @@
if( $this->_mode == "deleteComment" )
$this->registerFieldValidator( "commentId", new IntegerValidator());
else
- $this->registerFieldValidator( "commentIds", new ArrayValidator());
+ $this->registerFieldValidator( "commentIds", new ArrayValidator( new IntegerValidator()));
$view = new AdminArticleCommentsListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_deleting_comments"));
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletecustomfieldsaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletecustomfieldsaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletecustomfieldsaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -28,7 +28,7 @@
if( $this->_op == "deleteCustomField" )
$this->registerFieldValidator( "fieldId", new IntegerValidator());
else
- $this->registerFieldValidator( "fieldIds", new ArrayValidator());
+ $this->registerFieldValidator( "fieldIds", new ArrayValidator( new IntegerValidator()));
$view = new AdminCustomFieldsListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_incorrect_field_id"));
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletegalleryitemsaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletegalleryitemsaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletegalleryitemsaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -5,6 +5,7 @@
lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryalbums.class.php" );
lt_include( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/arrayvalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/view/admin/adminresourceslistview.class.php" );
/**
@@ -36,8 +37,8 @@
$this->_errorMessage = "";
// data validation
- $this->registerFieldValidator( "resourceIds", new ArrayValidator(), true );
- $this->registerFieldValidator( "albumIds", new ArrayValidator(), true );
+ $this->registerFieldValidator( "resourceIds", new ArrayValidator( new IntegerValidator()), true );
+ $this->registerFieldValidator( "albumIds", new ArrayValidator( new IntegerValidator()), true );
$view = new AdminResourcesListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_no_resources_selected"));
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeleteglobalarticlecategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeleteglobalarticlecategoryaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeleteglobalarticlecategoryaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -36,7 +36,7 @@
if( $this->_mode == "deleteGlobalArticleCategory" )
$this->registerFieldValidator( "categoryId", new IntegerValidator());
else
- $this->registerFieldValidator( "categoryIds", new ArrayValidator());
+ $this->registerFieldValidator( "categoryIds", new ArrayValidator( new IntegerValidator()));
$view = new AdminGlobalArticleCategoriesListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_incorrect_global_category_id"));
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletelinkaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletelinkaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletelinkaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -34,7 +34,7 @@
$view->setErrorMessage( $this->_locale->tr("error_incorrect_link_id"));
}
else {
- $this->registerFieldValidator( "linkIds", new ArrayValidator());
+ $this->registerFieldValidator( "linkIds", new ArrayValidator( new IntegerValidator()));
$view->setErrorMessage( $this->_locale->tr("error_no_links_selected"));
}
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletelinkcategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletelinkcategoryaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletelinkcategoryaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -32,7 +32,7 @@
if( $this->_op == "deleteLinkCategory" )
$this->registerFieldValidator( "categoryId", new IntegerValidator());
else
- $this->registerFieldValidator( "categoryIds", new ArrayValidator());
+ $this->registerFieldValidator( "categoryIds", new ArrayValidator( new IntegerValidator()));
$view->setErrorMessage( $this->_locale->tr("error_invalid_link_category_id"));
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletelocalesaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletelocalesaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletelocalesaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -23,7 +23,7 @@
if( $this->_op == "deleteLocale" )
$this->registerFieldValidator( "localeId", new StringValidator());
else
- $this->registerFieldValidator( "localeIds", new ArrayValidator());
+ $this->registerFieldValidator( "localeIds", new ArrayValidator( new StringValidator()));
$view = new AdminSiteLocalesListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_no_locales_selected"));
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletepermissionsaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletepermissionsaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletepermissionsaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -31,7 +31,7 @@
if( $this->_mode == "deletePermission" )
$this->registerFieldValidator( "permId", new IntegerValidator());
else
- $this->registerFieldValidator( "permIds", new ArrayValidator());
+ $this->registerFieldValidator( "permIds", new ArrayValidator( new IntegerValidator()));
$view = new AdminPermissionsListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_incorrect_permission_id"));
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletepostaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletepostaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletepostaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -32,7 +32,7 @@
if( $this->_mode == "deletePost" )
$this->registerFieldValidator( "postId", new IntegerValidator());
else
- $this->registerFieldValidator( "postIds", new ArrayValidator());
+ $this->registerFieldValidator( "postIds", new ArrayValidator( new IntegerValidator()));
$view = new AdminPostsListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_incorrect_article_id"));
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletereferreraction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletereferreraction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletereferreraction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -34,7 +34,7 @@
if( $this->_mode == "deleteReferrer" )
$this->registerFieldValidator( "referrerId", new IntegerValidator());
else
- $this->registerFieldValidator( "referrerIds", new ArrayValidator());
+ $this->registerFieldValidator( "referrerIds", new ArrayValidator( new IntegerValidator()));
$view = new AdminReferrersView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_no_items_selected" ));
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletetemplatesaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletetemplatesaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletetemplatesaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -27,7 +27,7 @@
if( $this->_op == "deleteTemplate" )
$this->registerFieldValidator( "templateId", new StringValidator());
else
- $this->registerFieldValidator( "templateIds", new ArrayValidator());
+ $this->registerFieldValidator( "templateIds", new ArrayValidator( new StringValidator()));
$view = new AdminSiteTemplatesListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_no_templates_selected"));
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeletetrackbackaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeletetrackbackaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeletetrackbackaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -33,7 +33,7 @@
if( $this->_mode == "deleteTrackback" )
$this->registerFieldValidator( "trackbackId", new IntegerValidator());
else
- $this->registerFieldValidator( "trackbackIds", new ArrayValidator());
+ $this->registerFieldValidator( "trackbackIds", new ArrayValidator( new IntegerValidator()));
$view = new AdminArticleTrackbacksListView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_deleting_trackbacks"));
Modified: plog/branches/lifetype-1.2/class/action/admin/admindeleteusersaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeleteusersaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeleteusersaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -25,7 +25,7 @@
// set up the data validation stuff
$this->_op = $actionInfo->getActionParamValue();
if( $this->_op == "deleteUsers" )
- $this->registerFieldvalidator( "userIds", new ArrayValidator());
+ $this->registerFieldvalidator( "userIds", new ArrayValidator( new IntegerValidator()));
else
$this->registerFieldValidator( "userId", new IntegerValidator());
$view = new AdminSiteUsersListView( $this->_blogInfo );
Modified: plog/branches/lifetype-1.2/class/action/admin/adminupdateeditblogaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminupdateeditblogaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/adminupdateeditblogaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -41,7 +41,7 @@
$this->AdminAction( $actionInfo, $request );
// data validation
- $this->registerFieldValidator( "blogUsers", new ArrayValidator(), true );
+ $this->registerFieldValidator( "blogUsers", new ArrayValidator( new IntegerValidator()), true );
$this->registerFieldValidator( "blogName", new BlogNameValidator());
$this->registerFieldValidator( "blogId", new IntegerValidator());
$this->registerFieldValidator( "blogStatus", new IntegerValidator());
Modified: plog/branches/lifetype-1.2/class/action/admin/adminupdatepostaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminupdatepostaction.class.php 2007-07-18 20:29:59 UTC (rev 5674)
+++ plog/branches/lifetype-1.2/class/action/admin/adminupdatepostaction.class.php 2007-07-18 20:47:04 UTC (rev 5675)
@@ -36,7 +36,7 @@
// for data validation purposes, posts must have at least a topic, an intro text, and a category
$this->registerFieldValidator( "postText", new StringValidator());
$this->registerFieldValidator( "postTopic", new StringValidator());
- $this->registerFieldValidator( "postCategories", new ArrayValidator());
+ $this->registerFieldValidator( "postCategories", new ArrayValidator( new IntegerValidator()));
$this->registerFieldValidator( "postId", new IntegerValidator());
$this->registerFieldValidator( "globalArticleCategoryId", new IntegerValidator(), true );
More information about the pLog-svn
mailing list