[pLog-svn] r6510 - plog/branches/lifetype-1.2/class/action/admin
mark at devel.lifetype.net
mark at devel.lifetype.net
Sun Jun 8 00:20:59 EDT 2008
Author: mark
Date: 2008-06-08 00:20:59 -0400 (Sun, 08 Jun 2008)
New Revision: 6510
Modified:
plog/branches/lifetype-1.2/class/action/admin/adminupdateresourcealbumaction.class.php
Log:
The same problem, we have to add $onlyIfAvailable = true in the end of those registerFieldValidator if the field is optional.
Modified: plog/branches/lifetype-1.2/class/action/admin/adminupdateresourcealbumaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminupdateresourcealbumaction.class.php 2008-06-08 04:08:59 UTC (rev 6509)
+++ plog/branches/lifetype-1.2/class/action/admin/adminupdateresourcealbumaction.class.php 2008-06-08 04:20:59 UTC (rev 6510)
@@ -34,8 +34,8 @@
$this->registerFieldValidator( "albumId", new IntegerValidator());
$this->registerFieldValidator( "albumName", new StringValidator());
$this->registerFieldValidator( "parentId", new IntegerValidator());
- $this->registerFieldValidator( "albumDescription", new StringValidator() );
- $this->registerFieldValidator( "showAlbum", new IntegerValidator() );
+ $this->registerFieldValidator( "albumDescription", new StringValidator(), true );
+ $this->registerFieldValidator( "showAlbum", new IntegerValidator(), true );
$view = new AdminEditResourceAlbumView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_updating_album" ));
$this->setValidationErrorView( $view );
@@ -52,9 +52,7 @@
$this->_parentId = $this->_request->getValue( "parentId" );
$this->_albumName = Textfilter::filterAllHTML($this->_request->getValue( "albumName" ));
$this->_albumDescription = Textfilter::filterAllHTML($this->_request->getValue( "albumDescription" ));
- $this->_showAlbum = $this->_request->getValue( "showAlbum" );
- if( $this->_showAlbum == "" )
- $this->_showAlbum = 0;
+ $this->_showAlbum = ( $this->_request->getValue( "showAlbum" ) != "" );
// fetch the albums for this blog
$albums = new GalleryAlbums();
More information about the pLog-svn
mailing list