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

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Thu Apr 25 05:16:05 EDT 2013


Author: jondaley
Date: 2013-04-25 05:16:05 -0400 (Thu, 25 Apr 2013)
New Revision: 7201

Modified:
   plog/branches/lifetype-1.2/class/action/admin/adminupdatepostaction.class.php
Log:
another change that I never checked in...  A user once reported that when updating a post and getting an invalid date (I think that was the field) when receiving bad data, we can replace it with the data that is in the database, rather than leaving it blank

Modified: plog/branches/lifetype-1.2/class/action/admin/adminupdatepostaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminupdatepostaction.class.php	2013-04-25 09:01:20 UTC (rev 7200)
+++ plog/branches/lifetype-1.2/class/action/admin/adminupdatepostaction.class.php	2013-04-25 09:16:05 UTC (rev 7201)
@@ -33,7 +33,12 @@
 
         	// postId is the must have field when we update the post.
         	$this->registerFieldValidator( "postId", new IntegerValidator() );
+        	
+			$posts = new Articles();
+            $post  = $posts->getBlogArticle( $this->_request->getValue( "postId" ), $this->_blogInfo->getId(), false );
         	$view = new AdminEditPostView( $this->_blogInfo );
+			$view->setArticle( $post );
+			
         	$view->setErrorMessage( $this->_locale->tr("error_updating_post"));
         	$this->setValidationErrorView( $view );
 



More information about the pLog-svn mailing list