[pLog-svn] r4307 - plugins/branches/lifetype-1.1/editcomments/class/view

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Thu Nov 16 04:29:30 GMT 2006


Author: jondaley
Date: 2006-11-16 04:29:28 +0000 (Thu, 16 Nov 2006)
New Revision: 4307

Modified:
   plugins/branches/lifetype-1.1/editcomments/class/view/admineditcommentsview.class.php
Log:
small optimization

Modified: plugins/branches/lifetype-1.1/editcomments/class/view/admineditcommentsview.class.php
===================================================================
--- plugins/branches/lifetype-1.1/editcomments/class/view/admineditcommentsview.class.php	2006-11-16 04:29:21 UTC (rev 4306)
+++ plugins/branches/lifetype-1.1/editcomments/class/view/admineditcommentsview.class.php	2006-11-16 04:29:28 UTC (rev 4307)
@@ -49,19 +49,20 @@
 			// load the comments and throw the correct event
 			$comments = new CommentsCommon();
 			if( $this->_article ) {
-				// load only the comments of the given post
-				$postComments = $comments->getPostComments( $this->_article->getId(),
+				// id of the article, for the pager...
+				$articleId = $this->_article->getId();
+
+                    // load only the comments of the given post
+				$postComments = $comments->getPostComments( $articleId,
 															COMMENT_ORDER_NEWEST_FIRST,
 															$this->_commentStatus, 
 															COMMENT_TYPE_COMMENT,
 															$this->_page, 
 															DEFAULT_ITEMS_PER_PAGE );
 				// number of comments
-				$numPostComments = $comments->getNumPostComments( $this->_article->getId(), 
+				$numPostComments = $comments->getNumPostComments( $articleId, 
 				                                                  $this->_commentStatus,
 																  COMMENT_TYPE_COMMENT );
-				// id of the article, for the pager...
-				$articleId = $this->_article->getId();
 			}
 			else {
                     // load all comments given the current status
@@ -93,7 +94,6 @@
 				$pagerUrl .= "&articleId={$articleId}&searchTerms=".
                     $this->_searchTerms."&page=";
             }
-				
 			// calculate the pager url
 			$pager = new Pager( $pagerUrl,
 					    $this->_page,



More information about the pLog-svn mailing list