[pLog-svn] r3473 - plog/trunk/class/dao

mark at devel.lifetype.net mark at devel.lifetype.net
Sun May 28 13:43:15 GMT 2006


Author: mark
Date: 2006-05-28 13:43:15 +0000 (Sun, 28 May 2006)
New Revision: 3473

Modified:
   plog/trunk/class/dao/blogarticles.class.php
Log:
One article could have multiple categories. So, the $this->_articlesByCategory[$categoryId][] = $article; should inside foreach loop.

Modified: plog/trunk/class/dao/blogarticles.class.php
===================================================================
--- plog/trunk/class/dao/blogarticles.class.php	2006-05-28 13:41:15 UTC (rev 3472)
+++ plog/trunk/class/dao/blogarticles.class.php	2006-05-28 13:43:15 UTC (rev 3473)
@@ -43,7 +43,6 @@
                 $status     = $article->getStatus();
 
                 $this->_articles[]                        = $article;
-                $this->_articlesByCategory[$categoryId][] = $article;
                 $this->_articlesByDate[$date][]           = $article;
                 $this->_articlesByStatus[$status][]       = $article;
                 $this->_articlesByUser[$userId][]         = $article;
@@ -52,6 +51,7 @@
                 $this->_articleDates[$year][$month][]     = $article;
                 foreach( $article->getCategoryIds() as $categoryId )
 	                $this->_articleCategories[$articleId][]   = $categoryId;
+	                $this->_articlesByCategory[$categoryId][] = $article;
             }
         }
 



More information about the pLog-svn mailing list