[pLog-svn] r946 - plog/trunk/class/action

oscar at devel.plogworld.net oscar at devel.plogworld.net
Fri Feb 4 18:32:25 GMT 2005


Author: oscar
Date: 2005-02-04 18:32:25 +0000 (Fri, 04 Feb 2005)
New Revision: 946

Modified:
   plog/trunk/class/action/viewarticleaction.class.php
Log:
possible fix for issue 128 (http://bugs.plogworld.net/view.php?id=128)

Modified: plog/trunk/class/action/viewarticleaction.class.php
===================================================================
--- plog/trunk/class/action/viewarticleaction.class.php	2005-02-04 18:15:54 UTC (rev 945)
+++ plog/trunk/class/action/viewarticleaction.class.php	2005-02-04 18:32:25 UTC (rev 946)
@@ -84,17 +84,19 @@
                                                           "categoryName" => $this->_categoryName,
                                                           "userId" => $this->_userId,
                                                           "userName" => $this->_userName,
-                                                          "date" => $this->_date )); 
-
+                                                          "date" => $this->_date ));
+														  
 			if( $this->_view->isCached()) {
-				// if the view is cached, only update the number of times that the article has been
-				// read (if configured to do so) and quit
 				if( $this->_config->getValue( 'update_cached_article_reads', false )) {
-					$this->updateNumArticleReads( $this->_articleId );
+					if( $this->_articleId ) 
+						$this->articles->updateArticleNumReads( $this->_articleId );
+					else
+						$this->articles->updateArticleNumReadsByName( $this->_articleName );
 				}
+				
 				return true;
 			}
-
+														  
 			// ---
 			// if we got a category name or a user name instead of a category
 			// id and a user id, then we have to look up first those




More information about the pLog-svn mailing list