Show
Ignore:
Timestamp:
08/21/06 19:48:40 (2 years ago)
Author:
mbonetti
Message:

Some more multi-user-hacking

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/multiuser/feed.php

    r1524 r1541  
    6161) { 
    6262    $sqlid = sanitize($_REQUEST['channel'], RSS_SANITIZER_SIMPLE_SQL | RSS_SANITIZER_NO_SPACES); 
    63     $sql = "select id from " . getTable("channels") ." where title like '$sqlid'"; 
     63    $sql = "select c.id from "  
     64    . getTable("channels")  
     65    ." c left join " .getTable('channels2user') ." c2u on (c.id=c2u.fkcid) " 
     66    ." where c.title like '$sqlid'"; 
    6467    if (hidePrivate()) { 
    65         $sql .=" and not(mode & " . RSS_MODE_PRIVATE_STATE .") "; 
     68        $sql .=" and c2u.flgprivate=0 "; 
    6669    } 
    6770    // don't hide deprecated items becuase we want items of deprecated feeds to be accessible 
     
    7679 
    7780        // is this a folder? 
    78         $sql = "select c.id, c.parent from ". getTable('channels')." c, " 
     81        $sql = "select c.id, c.parent from ". getTable('channels')." c left join " 
     82               . getTable('channels2user') .' c2u on (c.id=c2u.fkcid), ' 
    7983               . getTable('folders') . " f " 
    8084               ." where c.parent=f.id and f.name like '$sqlid' and f.id > 0"; 
    8185 
    8286        if (hidePrivate()) { 
    83             $sql .=" and not(c.mode & " . RSS_MODE_PRIVATE_STATE .") "; 
    84         } 
    85         $sql .= " and not(c.mode & " .  RSS_MODE_DELETED_STATE .") "; 
     87            $sql .=" and c2u.flgprivate=0 "; 
     88        } 
     89        $sql .= " and c2u.flgdeleted=0 "; 
    8690 
    8791        $res = rss_query( $sql );