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

mark at devel.lifetype.net mark at devel.lifetype.net
Mon Jun 9 01:04:08 EDT 2008


Author: mark
Date: 2008-06-09 01:04:07 -0400 (Mon, 09 Jun 2008)
New Revision: 6516

Modified:
   plog/branches/lifetype-1.2/class/action/admin/adminupdatepluginsettingsaction.class.php
Log:
We just use array validator with integer validator to validate canOverride array.

Modified: plog/branches/lifetype-1.2/class/action/admin/adminupdatepluginsettingsaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminupdatepluginsettingsaction.class.php	2008-06-08 20:05:19 UTC (rev 6515)
+++ plog/branches/lifetype-1.2/class/action/admin/adminupdatepluginsettingsaction.class.php	2008-06-09 05:04:07 UTC (rev 6516)
@@ -4,6 +4,8 @@
     lt_include( PLOG_CLASS_PATH."class/view/admin/adminpluginsettingsview.class.php" );
     lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/emptyvalidator.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/plugin/globalpluginconfig.class.php" );
 
     /**
@@ -56,8 +58,7 @@
 			}
 			
 			// "can override" fields
-            // TODO: what validator?
-			$this->registerField( "canOverride" );
+			$this->registerFieldValidator( "canOverride", new ArrayValidator( new IntegerValidator() ), true );
 		}
 
         /**
@@ -77,7 +78,7 @@
 			GlobalPluginConfig::setValues( $settings );
 			
 			// load the override settings and save them
-			GlobalPluginConfig::setOverrideSettings( $this->_request->getValue( "canOverride" ));
+			GlobalPluginConfig::setOverrideSettings( $this->_request->getValue( "canOverride" ) );
 			
 			$this->_view = new AdminPluginSettingsView( $this->_blogInfo, $this->_userInfo );
 			$this->_view->setData( true );



More information about the pLog-svn mailing list