[pLog-svn] r3119 - plog/trunk/class/action/admin

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Fri Mar 24 17:56:55 GMT 2006


Author: jondaley
Date: 2006-03-24 17:56:54 +0000 (Fri, 24 Mar 2006)
New Revision: 3119

Modified:
   plog/trunk/class/action/admin/admindeletetrackbackaction.class.php
Log:
check if article exists when deleting.  granted, this shouldn't ever happen, but currently trackbacks are not deleted properly when articles are purged

Modified: plog/trunk/class/action/admin/admindeletetrackbackaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admindeletetrackbackaction.class.php	2006-03-24 16:52:41 UTC (rev 3118)
+++ plog/trunk/class/action/admin/admindeletetrackbackaction.class.php	2006-03-24 17:56:54 UTC (rev 3119)
@@ -101,7 +101,7 @@
 					
 					// check if the trackback really belongs to this blog...
 					$article = $trackback->getArticle();
-					if( $article->getBlogId() != $this->_blogInfo->getId()) {
+					if( !$article || ($article->getBlogId() != $this->_blogInfo->getId())) {
 						// if not, then we shouldn't be allowed to remove anything!						
 						$errorMessage .= $this->_locale->pr("error_deleting_trackback", $trackback->getExcerpt())."<br/>";
 					}



More information about the pLog-svn mailing list