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

mark at devel.lifetype.net mark at devel.lifetype.net
Sun Jun 8 00:33:14 EDT 2008


Author: mark
Date: 2008-06-08 00:33:13 -0400 (Sun, 08 Jun 2008)
New Revision: 6511

Modified:
   plog/branches/lifetype-1.2/class/action/admin/adminupdateresourceaction.class.php
Log:
resourceDescription and regenerate are optional.

Modified: plog/branches/lifetype-1.2/class/action/admin/adminupdateresourceaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminupdateresourceaction.class.php	2008-06-08 04:20:59 UTC (rev 6510)
+++ plog/branches/lifetype-1.2/class/action/admin/adminupdateresourceaction.class.php	2008-06-08 04:33:13 UTC (rev 6511)
@@ -31,14 +31,9 @@
 			// data validation
 			$this->registerFieldValidator( "albumId", new IntegerValidator());
 			$this->registerFieldValidator( "resourceId", new IntegerValidator());
-                // TODO: we previously silently stripped out HTML, still okay this way?
-			$this->registerFieldValidator( "resourceDescription", new StringValidator());
+			$this->registerFieldValidator( "resourceDescription", new StringValidator(), true);
+			$this->registerFieldValidator( "regenerate", new StringValidator(), true);
 
-                // TODO: this gets a string from the locale - we correctly check it below
-                // so this validator is on the paranoid side, and could be removed if it
-                // breaks something
-			$this->registerFieldValidator( "regenerate", new StringValidator());
-
 			$view = new AdminEditResourceView( $this->_blogInfo );
 			$view->setErrorMessage( $this->_locale->tr("error_updating_resource" ));
 			$this->setValidationErrorView( $view );
@@ -86,7 +81,7 @@
                 $this->_view->setErrorMessage( $this->_locale->tr("error_updating_resource"));
             }
             else {
-                    // check which submit button was pressed
+                // check which submit button was pressed
                 if($this->_request->getValue("regenerate" ) != ""){
                     return Controller::setForwardAction( "regeneratePreview" );
                 }
@@ -95,7 +90,7 @@
                 $this->_view->setSuccessMessage( $this->_locale->pr("resource_updated_ok", $resource->getFileName()));
                 $this->notifyEvent( EVENT_POST_RESOURCE_UPDATE, Array( "resource" => &$resource ));				
                 
-                    // clear the cache
+                // clear the cache
                 CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
             }
 



More information about the pLog-svn mailing list