Show
Ignore:
Timestamp:
09/26/07 08:57:31 (14 months ago)
Author:
mdodoo
Message:

Lots of things are still not working, but I think this code is better than what was currently committed ([1639]
should have been reverted, and the person who committed should have had their SVN access pulled, for example).
Created this by grabbing the trunk code and then manually inserting the MU branch's changes in. This is probably
not usable in an actual installation (no support for creating new user accounts yet, for example), but patches are
welcome.

Not sure why I write so much here - I am not sure anyone other than my fellow devs actually read them...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/multiuser/feed.php

    r1604 r1759  
    6060    && !is_numeric($_REQUEST['channel']) 
    6161) { 
    62     $sqlid = sanitize($_REQUEST['channel'], RSS_SANITIZER_SIMPLE_SQL | RSS_SANITIZER_NO_SPACES); 
    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'"; 
     62    $sqlid = preg_replace('#'.RSS_URI_SEPARATOR.'#','_', 
     63        sanitize($_REQUEST['channel'] , RSS_SANITIZER_SIMPLE_SQL ) 
     64        ); 
     65 
     66    $sql = "select c.id from " . getTable("channels")  
     67      . " c left join " .getTable('channels2user')  
     68      ." c2u on (c.id=c2u.fkcid) where title like '$sqlid'"; 
    6769    if (hidePrivate()) { 
    6870        $sql .=" and c2u.flgprivate=0 "; 
    6971    } 
    7072    // don't hide deprecated items becuase we want items of deprecated feeds to be accessible 
    71     // $sql .= " and not(mode & " . RSS_MODE_DELETED_STATE . ") "; 
     73    // $sql .= " and c2u.flgdeleted=0 "; 
    7274 
    7375    $res =  rss_query( $sql ); 
     
    8082        // is this a folder? 
    8183        $sql = "select c.id, c.parent from ". getTable('channels')." c left join " 
    82             . getTable('channels2user') .m" c2u on (c.id=c2u.fkcid) " 
    83         . "inner join " . getTable('folders') . " f  on c.parent=f.id " 
    84         . "where f.name like '$sqlid' and f.id > 0"; 
     84          . getTable('channels2user') . " c2u on (c.id=c2u.fkcid) " 
     85          ." inner join " . getTable('folders') . " f on f.id = c.parent " 
     86          ." where f.name like '$sqlid' and f.id > 0"; 
    8587 
    8688        if (hidePrivate()) { 
     
    308310 
    309311        /** mark channel as read **/ 
    310         $sql = "update " .getTable("item") 
    311                ." set unread = unread & ".SET_MODE_READ_STATE." where cid=$cid"; 
     312        $sql = "update " .getTable("i2u") 
     313               ." set flgunread = 0 where i2u.fkcid=$cid"; 
    312314        if (hidePrivate()) { 
    313             $sql .= " and not(unread & " . RSS_MODE_PRIVATE_STATE . ")"; 
     315            $sql .= " and i2u.flgprivate =0"; 
    314316        } 
    315317        if (count($IdsToMarkAsRead)) { 
     
    323325 
    324326        $sql = "select count(*) from " .getTable("item2user") . " i2u " 
    325                ." where i2u.flgunread=1 " 
    326                ." and i2u.fkcid=$cid" 
    327                ." and i2u.flgdeleted=0 " 
    328                ; 
     327                ." where i2u.flgunread=1 " 
     328                ." and i2u.fkcid=$cid" 
     329                ." and i2u.flgdeleted=0 "; 
    329330        if (hidePrivate()) { 
    330331            $sql .=" and i2u.flgprivate =0"; 
     
    11811182     
    11821183            $sql = "select c.id, c.title from " . getTable("channels") ." c " 
    1183             . "inner join " . getTable("folders") ." d on d.id = c.parent "; 
     1184            . "inner join " . getTable("folders") ." d on d.id = c.parent " 
    11841185            . " where not(c.mode & " .  RSS_MODE_DELETED_STATE .") "; 
    11851186