[pLog-svn] r2134 - plog/branches/plog-1.1-ben/class/dao
ork at devel.plogworld.net
ork at devel.plogworld.net
Tue May 31 13:29:46 GMT 2005
Author: ork
Date: 2005-05-31 13:29:45 +0000 (Tue, 31 May 2005)
New Revision: 2134
Modified:
plog/branches/plog-1.1-ben/class/dao/blogarticles.class.php
Log:
added getCategoriesForArticle, returning all categories of an article
Modified: plog/branches/plog-1.1-ben/class/dao/blogarticles.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/dao/blogarticles.class.php 2005-05-31 13:28:34 UTC (rev 2133)
+++ plog/branches/plog-1.1-ben/class/dao/blogarticles.class.php 2005-05-31 13:29:45 UTC (rev 2134)
@@ -16,6 +16,7 @@
var $_articlesByStatus = array();
var $_articleStatus = array();
var $_articleDate = array();
+ var $_articleCategories = array();
/**
* Constructor
@@ -44,6 +45,7 @@
$this->_articlesByStatus[$status][] = $articleId;
$this->_articleStatus[$articleId] = $status;
$this->_articleDate[$articleId] = $date;
+ $this->_articleCategories[$articleId][] = $categoryId;
}
}
@@ -126,5 +128,13 @@
return $matchingArticleIds;
}
+
+ function getCategoriesForArticle( $articleId )
+ {
+ if( !array_key_exists($articleId, $this->_articleCategories) )
+ return array();
+
+ return $this->_articleCategories[$articleId];
+ }
}
?>
More information about the pLog-svn
mailing list