Changeset 1543

Show
Ignore:
Timestamp:
08/23/06 22:40:42 (4 years ago)
Author:
cfriesen
Message:

I did this one a while ago, too.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/cls/items.php

    r1475 r1543  
    288288            ." i.pubdate is not null as ispubdate, i.id, r.rating  "; 
    289289        $this -> _sqlActualFrom =   getTable("item") ." i " 
    290             ." left join " 
    291             . getTable("rating") ." r on (i.id = r.iid), " 
    292             .getTable("channels")." c, " 
    293             .getTable("folders") ." f "; 
    294  
    295         $this -> _sqlActualWhere = " i.cid = c.id and " 
    296             ." f.id=c.parent and ". (false == $includeDeprecated ? " not(c.mode & ".RSS_MODE_DELETED_STATE.") and " : "") 
     290            ." left join " . getTable("rating") ." r on (i.id = r.iid) " 
     291            ." inner join " . getTable("channels")." c on (c.id = i.cid) " 
     292            ." inner join " . getTable("folders") ." f on (f.id = c.parent) "; 
     293 
     294        $this -> _sqlActualWhere = (false == $includeDeprecated ? " not(c.mode & ".RSS_MODE_DELETED_STATE.") and " : "") 
    297295            ." not(i.unread & ".RSS_MODE_DELETED_STATE.") and "; 
    298              
    299  
    300296 
    301297        if (hidePrivate()) { 
     
    413409        if (count($this -> iids)) { 
    414410            // fetch the tags for the items; 
    415             $sql = "select t.tag,m.fid,i.cid " 
    416             ." from " 
    417             .getTable('tag')." t, " 
    418             .getTable('metatag')." m, " 
    419             .getTable('item')." i " 
    420             ." where m.tid = t.id and i.id=m.fid and m.ttype = 'item' and m.fid in (".implode(",", $this -> iids).")"; 
     411            $sql = "select t.tag, m.fid, i.cid " 
     412            ." from " . getTable('tag')." t " 
     413            ." inner join " . getTable('metatag') . " m " 
     414            ."   on m.tid = t.id " 
     415            ." inner join " . getTable('item')." i " 
     416            ."   on i.id = m.fid " 
     417            ." where m.ttype = 'item' and m.fid in (".implode(",", $this -> iids).")"; 
    421418             
    422419            $res = $GLOBALS['rss_db']->rss_query($sql);