[pLog-svn] r979 - plog/trunk/class/action
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Sun Feb 6 20:54:28 GMT 2005
Author: oscar
Date: 2005-02-06 20:54:28 +0000 (Sun, 06 Feb 2005)
New Revision: 979
Modified:
plog/trunk/class/action/blogaction.class.php
plog/trunk/class/action/viewarticleaction.class.php
Log:
partly fixed issue 164, where the list of referrers wasn't being updated at *all* in ViewArticleAction. Go figure, I had forgotten to add the code :)
Modified: plog/trunk/class/action/blogaction.class.php
===================================================================
--- plog/trunk/class/action/blogaction.class.php 2005-02-06 20:28:21 UTC (rev 978)
+++ plog/trunk/class/action/blogaction.class.php 2005-02-06 20:54:28 UTC (rev 979)
@@ -224,7 +224,7 @@
*/
function _updateReferrer()
{
- if( $this->_request->getValue( "articleId" ) != "" )
+ if( $this->_request->getValue( "articleId" ) != "" || $this->_request->getValue( "articleName" ) != "" )
return true;
// update the referer statistics
Modified: plog/trunk/class/action/viewarticleaction.class.php
===================================================================
--- plog/trunk/class/action/viewarticleaction.class.php 2005-02-06 20:28:21 UTC (rev 978)
+++ plog/trunk/class/action/viewarticleaction.class.php 2005-02-06 20:54:28 UTC (rev 979)
@@ -62,6 +62,16 @@
/**
* @private
+ * updates the article referrers
+ */
+ function _updateArticleReferrers( $article )
+ {
+ $referrers = new Referers();
+ $referrers->addReferer( $_SERVER['HTTP_REFERER'], $article->getId(), $this->_blogInfo->getId());
+ }
+
+ /**
+ * @private
* updates the number of times that an article has been read in the db
*
* @param articleId
@@ -151,6 +161,9 @@
if( $this->_config->getValue( "update_article_reads" )) {
$this->updateNumArticleReads( $article->getId());
}
+
+ // update the referrers, if needed
+ $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