Changeset 1759 for branches/multiuser/feed.php
- Timestamp:
- 09/26/07 08:57:31 (14 months ago)
- Files:
-
- 1 modified
-
branches/multiuser/feed.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/multiuser/feed.php
r1604 r1759 60 60 && !is_numeric($_REQUEST['channel']) 61 61 ) { 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'"; 67 69 if (hidePrivate()) { 68 70 $sql .=" and c2u.flgprivate=0 "; 69 71 } 70 72 // 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 "; 72 74 73 75 $res = rss_query( $sql ); … … 80 82 // is this a folder? 81 83 $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"; 85 87 86 88 if (hidePrivate()) { … … 308 310 309 311 /** mark channel as read **/ 310 $sql = "update " .getTable("i tem")311 ." set unread = unread & ".SET_MODE_READ_STATE." wherecid=$cid";312 $sql = "update " .getTable("i2u") 313 ." set flgunread = 0 where i2u.fkcid=$cid"; 312 314 if (hidePrivate()) { 313 $sql .= " and not(unread & " . RSS_MODE_PRIVATE_STATE . ")";315 $sql .= " and i2u.flgprivate =0"; 314 316 } 315 317 if (count($IdsToMarkAsRead)) { … … 323 325 324 326 $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 "; 329 330 if (hidePrivate()) { 330 331 $sql .=" and i2u.flgprivate =0"; … … 1181 1182 1182 1183 $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 " 1184 1185 . " where not(c.mode & " . RSS_MODE_DELETED_STATE .") "; 1185 1186
