Changeset 1541 for branches/multiuser/cls
- Timestamp:
- 08/21/06 19:48:40 (2 years ago)
- Location:
- branches/multiuser/cls
- Files:
-
- 2 modified
-
channels.php (modified) (5 diffs)
-
items.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/multiuser/cls/channels.php
r1524 r1541 170 170 _pf(' ... totalCount'); 171 171 $sql = 172 "select count(*) from ".getTable("item2user") . "i , " . getTable('channels') . " c " 173 174 ." where i.fkcid=c.id and i.flgdeleted=0 " 175 ." and not (c.mode & " .RSS_MODE_DELETED_STATE.")" 172 "select count(*) from ".getTable("item2user") . "i , " 173 . getTable('channels2user') . " c2u " 174 ." where i.fkcid=c2u.fkcid and i.flgdeleted=0 " 175 ." and c2u.fkuid=" . rss_user_id() 176 ." and i.fkuid=" . rss_user_id() 177 ." and c2u.flgdeleted=0" 176 178 . (hidePrivate()? " and i.flgprivate=0":""); 177 179 … … 184 186 _pf(' ... feedsCount'); 185 187 $res = rss_query("select count(*) from " 186 .getTable("channels")." where not(mode & ".RSS_MODE_DELETED_STATE.")" 187 . (hidePrivate()? " and not(mode & ".RSS_MODE_PRIVATE_STATE.")":"") 188 .getTable("channels2user")." where flgdeleted=0 " 189 ." and fkuid=" . rss_user_id() 190 . (hidePrivate()? " and flgprivate=0":"") 188 191 ); 189 192 … … 220 223 ." from " 221 224 .getTable('item2user') ." i2u, " 222 .getTable('channels ') . " c, "225 .getTable('channels2user') . " c2u, " 223 226 .getTable('folders') ." f " 224 227 ." where i2u.flgunread =1 " … … 227 230 $sql .=" and i2u.flgprivate =0 "; 228 231 } 229 $sql .= " and not(c.mode & " . RSS_MODE_DELETED_STATE .") "; 230 $sql .= " and i2u.fkcid=c.id and c.parent=f.id " 232 $sql .= " and c2u.fkuid=" . rss_user_id(); 233 $sql .= " and c2u.flgdeleted=0 "; 234 $sql .= " and c2u.parent=f.id " 231 235 ." group by f.id"; 232 236 _pf('query'); … … 249 253 function populate() { 250 254 _pf('FeedList->populate() ...'); 251 $sql = "select "." c.id, c.title, c.url, c.siteurl, f.name, c.parent, c.icon, c.descr, c.mode "." from ".getTable("channels")." c, " 252 .getTable("folders")." f "." where f.id = c.parent"; 253 255 $sql = "select " 256 ." c.id, c.title, c.url, c.siteurl, f.name, c2u.parent, c2u.icon, c.descr, c2u.flgdeleted,c2u.flgprivate " 257 ." from " 258 .getTable("channels")." c, " 259 .getTable("channels2user")." c2u, " 260 .getTable("folders")." f " 261 262 ." where " 263 ." f.id = c.parent " 264 ." and c2u.fkcid=c.id " 265 . " and c2u.fkuid=" . rss_user_id(); 254 266 if (hidePrivate()) { 255 $sql .= " and not(c.mode & ".RSS_MODE_PRIVATE_STATE.")";256 } 257 258 $sql .= " and not(c.mode & ".RSS_MODE_DELETED_STATE.")";267 $sql .= " and c2u.flgprivate=0 "; 268 } 269 270 $sql .= " and c2u.flgdeleted=0 "; 259 271 260 272 if (getConfig('rss.config.absoluteordering')) { 261 $sql .= " order by f.position asc, c .position asc";273 $sql .= " order by f.position asc, c2u.position asc"; 262 274 } else { 263 275 $sql .= " order by f.name, c.title asc"; -
branches/multiuser/cls/items.php
r1524 r1541 262 262 $this -> ORDER_BY_UNREAD_FIRST = " order by i2u.flgunread desc, "; 263 263 if (getConfig('rss.config.absoluteordering')) { 264 $this -> ORDER_BY_UNREAD_FIRST .= " f.position asc, c .position asc";264 $this -> ORDER_BY_UNREAD_FIRST .= " f.position asc, c2u.position asc"; 265 265 } else { 266 266 $this -> ORDER_BY_UNREAD_FIRST .= " f.name asc, c.title asc"; … … 284 284 _pf('ItemList::populate()'); 285 285 $this -> _sqlActualWhat = " i.title, c.title, c.id, " 286 ."i2u.flgunread, i2u.flgprivate, i2u.flgsticky, i2u.flgdeleted, i2u.flgflagged," 287 ."i.url, i.enclosure, i.author, i.description, c.icon, " 286 ."i2u.flgunread, i2u.flgprivate, i2u.flgsticky, i2u.flgdeleted, " 287 ." i2u.flgflagged," 288 ."i.url, i.enclosure, i.author, i.description, c2u.icon, " 288 289 ." unix_timestamp(ifnull(i.pubdate,i.added)) as ts, " 289 290 ." i.pubdate is not null as ispubdate, i.id " … … 298 299 //." left join " 299 300 //. getTable("rating") ." r on (i.id = r.iid), " 300 .getTable("channels")." c on (i.cid=c.id) left join " 301 .getTable("folders") ." f on (c.parent=f.id) "; 301 .getTable('channels2user') ." c2u on (i.cid=c2u.fkcid) left join " 302 .getTable("channels")." c on (c2u.fkcid=c.id) left join " 303 .getTable("folders") ." f on (c2u.parent=f.id) "; 302 304 303 305 … … 308 310 309 311 $this -> _sqlActualWhere .= " and " 310 . (false == $includeDeprecated ? " not(c.mode & ".RSS_MODE_DELETED_STATE.")and " : "")312 . (false == $includeDeprecated ? " c2u.flgdeleted=0 and " : "") 311 313 ." i2u.flgdeleted=0 and "; 312 314 … … 337 339 if (!getConfig('rss.config.feedgrouping')) { 338 340 if(getConfig("rss.config.datedesc.$skey")){ 339 $this -> _sqlActualOrder = " ts desc, f.position asc, c .position asc ";341 $this -> _sqlActualOrder = " ts desc, f.position asc, c2u.position asc "; 340 342 }else{ 341 $this -> _sqlActualOrder = " ts asc, f.position asc, c .position asc ";343 $this -> _sqlActualOrder = " ts asc, f.position asc, c2u.position asc "; 342 344 } 343 345 } elseif (getConfig('rss.config.absoluteordering')) { 344 $this -> _sqlActualOrder = " f.position asc, c .position asc";346 $this -> _sqlActualOrder = " f.position asc, c2u.position asc"; 345 347 } else { 346 348 $this -> _sqlActualOrder = " f.name asc, c.title asc";
