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

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Mon Jul 9 17:12:03 EDT 2007


Author: jondaley
Date: 2007-07-09 17:12:03 -0400 (Mon, 09 Jul 2007)
New Revision: 5634

Modified:
   plog/branches/lifetype-1.2/class/action/addcommentaction.class.php
Log:
Check whether article id is valid.  fixes http://bugs.lifetype.net/view.php?id=1280

Modified: plog/branches/lifetype-1.2/class/action/addcommentaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/addcommentaction.class.php	2007-07-09 20:53:15 UTC (rev 5633)
+++ plog/branches/lifetype-1.2/class/action/addcommentaction.class.php	2007-07-09 21:12:03 UTC (rev 5634)
@@ -169,6 +169,12 @@
             // the database, plus this last one
             $articles = new Articles();
             $article  = $articles->getBlogArticle( $this->_articleId, $this->_blogInfo->getId());
+            if(!$article) {
+                 $this->_view = new ErrorView( $this->_blogInfo );
+                 $this->_view->setValue( "message", $this->_locale->tr("error_incorrect_article_id"));
+                 $this->setCommonData();
+                 return false;
+            }
 			
 			$this->notifyEvent( EVENT_POST_LOADED, Array( "article" => &$article ));
 



More information about the pLog-svn mailing list