[pLog-svn] r5089 - in plugins/branches/lifetype-1.2/hiddeninput: . class/action

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Mar 14 10:14:26 EDT 2007


Author: jondaley
Date: 2007-03-14 10:14:26 -0400 (Wed, 14 Mar 2007)
New Revision: 5089

Modified:
   plugins/branches/lifetype-1.2/hiddeninput/class/action/pluginhiddeninputupdateconfigaction.class.php
   plugins/branches/lifetype-1.2/hiddeninput/pluginhiddeninput.class.php
Log:
we can't allow spaces within elements

Modified: plugins/branches/lifetype-1.2/hiddeninput/class/action/pluginhiddeninputupdateconfigaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/hiddeninput/class/action/pluginhiddeninputupdateconfigaction.class.php	2007-03-14 14:13:35 UTC (rev 5088)
+++ plugins/branches/lifetype-1.2/hiddeninput/class/action/pluginhiddeninputupdateconfigaction.class.php	2007-03-14 14:14:26 UTC (rev 5089)
@@ -23,6 +23,7 @@
             $this->_pluginEnabled = $this->_request->getValue( "pluginEnabled" );
             $this->_pluginEnabled = ($this->_pluginEnabled != "" );	
             $this->_hiddenFields = $this->_request->getValue( "hiddenFields" );
+            $this->_hiddenFields = ereg_replace("[[:space:]]", "", $this->_hiddenFields);
             $val = new StringValidator();
             if( !$val->validate($this->_hiddenFields) ) {
                 $this->_view = new PluginHiddenInputConfigView( $this->_blogInfo );
@@ -35,10 +36,11 @@
                 // Check to make sure that all values in the empty fields input
                 // box are also in the hidden fields
             $this->_emptyFields = $this->_request->getValue("emptyFields");
+            $this->_emptyFields = ereg_replace("[[:space:]]", "", $this->_emptyFields);
             $emptyFieldsExploded = explode(",", $this->_emptyFields);
 
             foreach($emptyFieldsExploded as $emptyField){
-                if($emptyField = trim($emptyField)){
+                if($emptyField){
                     if(strpos($this->_hiddenFields, $emptyField) === FALSE){
                         $this->_view =
                             new PluginHiddenInputConfigView($this->_blogInfo);

Modified: plugins/branches/lifetype-1.2/hiddeninput/pluginhiddeninput.class.php
===================================================================
--- plugins/branches/lifetype-1.2/hiddeninput/pluginhiddeninput.class.php	2007-03-14 14:13:35 UTC (rev 5088)
+++ plugins/branches/lifetype-1.2/hiddeninput/pluginhiddeninput.class.php	2007-03-14 14:14:26 UTC (rev 5089)
@@ -18,7 +18,7 @@
             $this->id = "hiddeninput";
             $this->author = "Mark Wu";
             $this->desc = "This plugin offers hidden fields to comment form to prevent spammer post from spam robot.";
-            $this->version = "20070313";
+            $this->version = "20070314";
             
             $this->prefix = Db::getPrefix();
             



More information about the pLog-svn mailing list