Changeset 722
- Timestamp:
- 01/22/09 17:55:17 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/multiBlogSearch/inc/class.multi.blog.search.php
r721 r722 22 22 public function getPosts($params = array(),$count_only = false) 23 23 { 24 $rs = $this->core->con->select('SELECT * FROM '.$this->core->prefix.'blog WHERE blog_status = "1"'); 25 $sb = array(); 26 while ($rs->fetch()) { 27 $s = new dcSettings($this->core,$rs->blog_id); 28 if ($s->multiblogsearch_enabled) { 29 $sb[] = "P.blog_id = '".$rs->blog_id."'"; 30 } 31 unset($s); 32 } 33 $where = ' ('.implode(' OR ',$sb).') '; 34 24 35 if ($count_only) 25 36 { … … 55 66 'FROM '.$this->core->prefix.'post P '. 56 67 'INNER JOIN '.$this->core->prefix.'user U ON U.user_id = P.user_id '. 57 ' NATURAL JOIN '.$this->core->prefix.'blog B'.68 'LEFT OUTER JOIN '.$this->core->prefix.'blog B ON B.blog_id = P.blog_id '. 58 69 'LEFT OUTER JOIN '.$this->core->prefix.'category C ON P.cat_id = C.cat_id '; 59 70 … … 62 73 } 63 74 64 $strReq .= 65 "WHERE P.blog_id != '' AND B.blog_id = P.blog_id";75 $strReq .= "WHERE ".$where; 76 //"WHERE P.blog_id != '' "; 66 77 67 78 if (!$this->core->auth->check('contentadmin',$this->core->blog->id)) {
Note: See TracChangeset
for help on using the changeset viewer.