Dotclear

Changeset 722


Ignore:
Timestamp:
01/22/09 17:55:17 (14 years ago)
Author:
Tomtom33
Message:

Take care about enable plugin or not. That's running good now!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/multiBlogSearch/inc/class.multi.blog.search.php

    r721 r722  
    2222     public function getPosts($params = array(),$count_only = false) 
    2323     { 
     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           
    2435          if ($count_only) 
    2536          { 
     
    5566          'FROM '.$this->core->prefix.'post P '. 
    5667          '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 '. 
    5869          'LEFT OUTER JOIN '.$this->core->prefix.'category C ON P.cat_id = C.cat_id '; 
    5970 
     
    6273          } 
    6374 
    64           $strReq .= 
    65           "WHERE P.blog_id != '' AND B.blog_id = P.blog_id "; 
     75          $strReq .= "WHERE ".$where; 
     76          //"WHERE P.blog_id != '' "; 
    6677 
    6778          if (!$this->core->auth->check('contentadmin',$this->core->blog->id)) { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map