Changeset 1759 for branches/multiuser/cls
- Timestamp:
- 09/26/07 08:57:31 (3 years ago)
- Location:
- branches/multiuser/cls
- Files:
-
- 5 modified
-
channels.php (modified) (3 diffs)
-
items.php (modified) (9 diffs)
-
update.php (modified) (1 diff)
-
user.php (modified) (2 diffs)
-
wrappers/user.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/multiuser/cls/channels.php
r1640 r1759 224 224 ." from " . getTable('item2user') ." i2u " 225 225 . " inner join " . getTable('channels2user') . " c2u on c2u.fkuid=" . rss_user_id() 226 . " inner join " . getTable('folders') ." f on c2u.parent=f.id" 226 . " inner join " . getTable('channels') . " c on c.id = c2u.fkcid" 227 . " inner join " . getTable('folders') ." f on c.parent=f.id" 227 228 ." where i2u.flgunread =1 " 228 229 ." and i2u.flgdeleted=0 "; … … 252 253 _pf('FeedList->populate() ...'); 253 254 $sql = "select " 254 ." c.id, c.title, c.url, c.siteurl, f.name, c 2u.parent, c2u.icon, c.descr, c2u.flgdeleted,c2u.flgprivate "255 ." c.id, c.title, c.url, c.siteurl, f.name, c.parent, c2u.icon, c.descr, c2u.flgdeleted,c2u.flgprivate " 255 256 ." from ".getTable("channels")." c " 256 257 . " inner join " . getTable("channels2user")." c2u on c2u.fkcid=c.id " … … 265 266 266 267 if (getConfig('rss.config.absoluteordering')) { 267 $sql .= " order by f.position asc, c 2u.position asc";268 $sql .= " order by f.position asc, c.position asc"; 268 269 } else { 269 270 $sql .= " order by f.name, c.title asc"; -
branches/multiuser/cls/items.php
r1639 r1759 60 60 * ctor 61 61 */ 62 function Item($id, $title, $url, $enclosure, $parent, $author, $description, $date, $isPubDate, $unread, $ rating) {62 function Item($id, $title, $url, $enclosure, $parent, $author, $description, $date, $isPubDate, $unread, $private, $sticky, $flagged) { 63 63 $this->rss = &$GLOBALS['rss']; 64 64 $this->id = $id; 65 $this->flags = $unread;66 65 if ($title) { 67 66 $this->title = $title; … … 86 85 $this->isPubDate = $isPubDate; 87 86 $this -> tags=array(); 88 $this -> rating = $rating;89 $this ->isUnread = $unread & RSS_MODE_UNREAD_STATE;90 $this ->isPrivate = $ unread & RSS_MODE_PRIVATE_STATE;91 $this ->isDeleted = $unread & RSS_MODE_DELETED_STATE;92 $this ->isSticky = $ unread & RSS_MODE_STICKY_STATE;93 $this ->isFlag = $ unread & RSS_MODE_FLAG_STATE;87 //$this -> rating = $rating; 88 $this ->isUnread = $unread; 89 $this ->isPrivate = $private; 90 //$this ->isDeleted = $deleted; 91 $this ->isSticky = $sticky; 92 $this ->isFlag = $flagged; 94 93 //$this -> key = md5(rand(0,10000)); 95 94 … … 193 192 $this->items[] = $item; 194 193 195 if ((!$this -> hasUnreadItems) && $item-> flags & RSS_MODE_UNREAD_STATE) {194 if ((!$this -> hasUnreadItems) && $item->isUnread) { 196 195 $this -> hasUnreadItems = true; 197 196 } … … 260 259 261 260 // Predefined alternate ordering 262 $this -> ORDER_BY_UNREAD_FIRST = " order by i2u.flgunread & " . RSS_MODE_UNREAD_STATE . "desc, ";261 $this -> ORDER_BY_UNREAD_FIRST = " order by i2u.flgunread desc, "; 263 262 if (getConfig('rss.config.absoluteordering')) { 264 $this -> ORDER_BY_UNREAD_FIRST .= " f.position asc, c 2u.position asc";263 $this -> ORDER_BY_UNREAD_FIRST .= " f.position asc, c.position asc"; 265 264 } else { 266 $this -> ORDER_BY_UNREAD_FIRST .= " f.name asc, c 2u.title asc";265 $this -> ORDER_BY_UNREAD_FIRST .= " f.name asc, c.title asc"; 267 266 } 268 267 $this -> ORDER_BY_UNREAD_FIRST .= ", i.added desc, i.id asc"; … … 283 282 284 283 _pf('ItemList::populate()'); 285 $this -> _sqlActualWhat = " i.title, c.title, c.id, i2u.flgunread, " 286 ."i.url, i.enclosure, i.author, i.description, c2u.icon, " 284 $this -> _sqlActualWhat = " i.title, c.title, c.id," 285 . " i2u.flgunread, i2u.flgprivate, i2u.flgsticky, i2u.flgdeleted, i2u.flgflagged," 286 ." i.url, i.enclosure, i.author, i.description, c.icon, " 287 287 ." unix_timestamp(ifnull(i.pubdate,i.added)) as ts, " 288 288 ." i.pubdate is not null as ispubdate, i.id " … … 298 298 . " inner join " . getTable('channels2user') ." c2u on (i.cid=c2u.fkcid)" 299 299 . " inner join " . getTable("channels")." c on (c2u.fkcid=c.id)" 300 . " inner join " . getTable("folders") ." f on (c 2u.parent=f.id) ";300 . " inner join " . getTable("folders") ." f on (c.parent=f.id) "; 301 301 302 302 … … 336 336 if (!getConfig('rss.config.feedgrouping')) { 337 337 if(getConfig("rss.config.datedesc.$skey")){ 338 $this -> _sqlActualOrder = " ts desc, f.position asc, c 2u.position asc ";338 $this -> _sqlActualOrder = " ts desc, f.position asc, c.position asc "; 339 339 }else{ 340 $this -> _sqlActualOrder = " ts asc, f.position asc, c 2u.position asc ";340 $this -> _sqlActualOrder = " ts asc, f.position asc, c.position asc "; 341 341 } 342 342 } elseif (getConfig('rss.config.absoluteordering')) { 343 $this -> _sqlActualOrder = " f.position asc, c 2u.position asc";343 $this -> _sqlActualOrder = " f.position asc, c.position asc"; 344 344 } else { 345 345 $this -> _sqlActualOrder = " f.name asc, c.title asc"; … … 376 376 $curIdx = 0; 377 377 $f=null; 378 while (list ($ititle_, $ctitle_, $cid_, $iunread_, $i url_, $ienclosure_, $iauthor_, $idescr_, $cicon_, $its_, $iispubdate_, $iid_) = $GLOBALS['rss_db']->rss_fetch_row($res)) {378 while (list ($ititle_, $ctitle_, $cid_, $iunread_, $iprivate_, $isticky_, $ideleted_, $iflagged_, $iurl_, $ienclosure_, $iauthor_, $idescr_, $cicon_, $its_, $iispubdate_, $iid_) = $GLOBALS['rss_db']->rss_fetch_row($res)) { 379 379 380 380 // Built a new Item 381 $i = new Item($iid_, $ititle_, $iurl_, $ienclosure_, $cid_, $iauthor_, $idescr_, $its_, $iispubdate_, $iunread_ );381 $i = new Item($iid_, $ititle_, $iurl_, $ienclosure_, $cid_, $iauthor_, $idescr_, $its_, $iispubdate_, $iunread_, $iprivate_, $isticky_, $iflagged_); 382 382 383 383 // no dupes, please … … 411 411 // Some stats... 412 412 $this -> itemCount++; 413 if ($iunread_ & RSS_MODE_UNREAD_STATE) {413 if ($iunread_) { 414 414 $this -> unreadCount++; 415 415 $this -> unreadIids[] = $iid_; -
branches/multiuser/cls/update.php
r1639 r1759 99 99 if (!hidePrivate() || $ignorePrivate) { 100 100 if (count($newIds) > 0 && getConfig('rss.config.markreadonupdate')) { 101 rss_query("update ".getTable("item2user")." i2u set i2u.flgunread = unread &"102 .SET_MODE_READ_STATE." where unread & ".RSS_MODE_UNREAD_STATE103 ." and i2u.fkiid not in (".implode(",", $newIds).")");101 rss_query("update ".getTable("item2user")." i2u set i2u.flgunread = 0" 102 . " where i2u.flgunread=1" 103 ." and i2u.fkiid not in (".implode(",", $newIds).")"); 104 104 } 105 105 } -
branches/multiuser/cls/user.php
r1524 r1759 27 27 ############################################################################### 28 28 rss_require('cls/wrappers/user.php'); 29 rss_require('themes.php'); 30 rss_require('plugins.php'); 29 31 30 32 define ('RSS_USER_ACTION_LOGIN',0x01); … … 81 83 rss_redirect(''); 82 84 } 85 83 86 84 87 $cuname = $chash = null; -
branches/multiuser/cls/wrappers/user.php
r1524 r1759 38 38 } 39 39 40 function rss_user_show_private() { 41 return $GLOBALS['rssuser'] -> getShowPrivate(); 42 } 43 40 44 function rss_user_logout() { 41 45 $GLOBALS['rssuser'] -> logout();
