[pLog-svn] r3882 - plog/trunk/class/dao
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Mon Aug 14 20:48:30 GMT 2006
Author: oscar
Date: 2006-08-14 20:48:29 +0000 (Mon, 14 Aug 2006)
New Revision: 3882
Modified:
plog/trunk/class/dao/blogs.class.php
Log:
fixed a small issue with this Blogs::getNumBlogs()
Modified: plog/trunk/class/dao/blogs.class.php
===================================================================
--- plog/trunk/class/dao/blogs.class.php 2006-08-14 20:30:39 UTC (rev 3881)
+++ plog/trunk/class/dao/blogs.class.php 2006-08-14 20:48:29 UTC (rev 3882)
@@ -282,19 +282,20 @@
* @return The number of blogs
*/
function getNumBlogs( $status = BLOG_STATUS_ALL, $blogCategoryId = ALL_BLOG_CATEGORIES, $searchTerms = "" )
- {
+ {
$statusCond = "";
if( $status != BLOG_STATUS_ALL )
$statusCond = "status = '".Db::qstr($status)."'";
- $where = $statusCond;
+ $where .= $statusCond;
if( $blogCategoryId != ALL_BLOG_CATEGORIES )
- $where .= " AND blog_category_id = '".Db::qstr($blogCategoryId)."'";
+ $where .= " AND blog_category_id = '".Db::qstr($blogCategoryId)."'";
- if( $searchTerms != "" ){
+ if( $searchTerms != "" ) {
$searchCond = $this->getSearchConditions( $searchTerms );
if( $where != "" )
- $where .= " AND " . $searchCond;
+ $where .= " AND";
+ $where .= " ".$searchCond;
}
return( $this->getNumItems( $this->getPrefix()."blogs", $where ));
More information about the pLog-svn
mailing list