[pLog-svn] r3540 - plog/trunk/class/action/admin
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Tue Jun 6 13:16:05 GMT 2006
Author: oscar
Date: 2006-06-06 13:16:04 +0000 (Tue, 06 Jun 2006)
New Revision: 3540
Modified:
plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php
Log:
fixed issue 936
Modified: plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php 2006-06-06 13:15:19 UTC (rev 3539)
+++ plog/trunk/class/action/admin/adminupdateblogsettingsaction.class.php 2006-06-06 13:16:04 UTC (rev 3540)
@@ -6,6 +6,7 @@
include_once( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
include_once( PLOG_CLASS_PATH."class/view/admin/adminblogsettingsview.class.php" );
+ include_once( PLOG_CLASS_PATH."class/data/validator/rules/rangerule.class.php" );
/**
@@ -23,10 +24,13 @@
function AdminUpdateBlogSettingsAction( $actionInfo, $request )
{
$this->BlogOwnerAdminAction( $actionInfo, $request );
-
- // lots of stuff to register here...
+
+ // specific validator that does not allow an integer below 1
+ $val = new IntegerValidator();
+ $val->addRule( new RangeRule( 1, 99999999 ));
+ $this->registerFieldValidator( "blogMaxMainPageItems", $val );
+ // the rest of validators, as normal...
$this->registerFieldValidator( "blogMaxRecentItems", new IntegerValidator());
- $this->registerFieldValidator( "blogMaxMainPageItems", new IntegerValidator());
$this->registerFieldValidator( "blogName", new StringValidator());
$this->registerFieldValidator( "blogLocale", new StringValidator());
$this->registerFieldValidator( "blogTemplate", new StringValidator());
More information about the pLog-svn
mailing list