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

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Fri May 30 06:51:53 EDT 2008


Author: jondaley
Date: 2008-05-30 06:51:53 -0400 (Fri, 30 May 2008)
New Revision: 6493

Modified:
   plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php
Log:
only update referrers if the config setting is enabled.  fixes http://bugs.lifetype.net/view.php?id=1484

Modified: plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php	2008-05-30 10:33:30 UTC (rev 6492)
+++ plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php	2008-05-30 10:51:53 UTC (rev 6493)
@@ -154,11 +154,15 @@
 					$articles = new Articles();
 					if( $this->_articleId ){
 						$articles->updateArticleNumReads( $this->_articleId );
-                        $this->_updateArticleReferrersById( $this->_articleId );
+                        if( $this->_config->getValue( "referer_tracker_enabled" )) {
+                            $this->_updateArticleReferrersById( $this->_articleId );
+                        }
                     }
  					else if($this->_articleName){
 						$articles->updateArticleNumReadsByName( $this->_articleName );
-                        $this->_updateArticleReferrersByTitle($this->_articleName );
+                        if( $this->_config->getValue( "referer_tracker_enabled" )) {
+                            $this->_updateArticleReferrersByTitle($this->_articleName );
+                        }
                     }
                     else{
                             // print "Can't update referrers without an id or a name...";
@@ -247,7 +251,9 @@
             }
 			
 			// update the referrers, if needed
-			$this->_updateArticleReferrers( $article );
+            if( $this->_config->getValue( "referer_tracker_enabled" )) {
+                $this->_updateArticleReferrers( $article );
+            }
 						
             // if everything's fine, we set up the article object for the view
             $this->_view->setArticle( $article );



More information about the pLog-svn mailing list