Changeset 1524 for branches/multiuser
- Timestamp:
- 08/05/06 11:53:58 (2 years ago)
- Location:
- branches/multiuser
- Files:
-
- 11 modified
-
ajax.php (modified) (1 diff)
-
cls/channels.php (modified) (3 diffs)
-
cls/items.php (modified) (7 diffs)
-
cls/update.php (modified) (4 diffs)
-
cls/user.php (modified) (1 diff)
-
cls/wrappers/user.php (modified) (1 diff)
-
constants.php (modified) (1 diff)
-
feed.php (modified) (11 diffs)
-
index.php (modified) (4 diffs)
-
schema.php (modified) (5 diffs)
-
util.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/multiuser/ajax.php
r1493 r1524 78 78 $readItems = new ItemList(); 79 79 80 $readItems -> populate(" not(i.unread & ". RSS_MODE_UNREAD_STATE .")and i.cid= $cid", "", 0, 2, ITEM_SORT_HINT_READ);80 $readItems -> populate(" i2u.flgunread=0 and i.cid= $cid", "", 0, 2, ITEM_SORT_HINT_READ); 81 81 $readItems -> setTitle(LBL_H2_RECENT_ITEMS); 82 82 $readItems -> setRenderOptions(IL_TITLE_NO_ESCAPE); -
branches/multiuser/cls/channels.php
r1483 r1524 170 170 _pf(' ... totalCount'); 171 171 $sql = 172 "select count(*) from ".getTable("item ") . "i , " . getTable('channels') . " c "172 "select count(*) from ".getTable("item2user") . "i , " . getTable('channels') . " c " 173 173 174 ." where i. cid=c.id and not(i.unread & ".RSS_MODE_DELETED_STATE.")"174 ." where i.fkcid=c.id and i.flgdeleted=0 " 175 175 ." and not (c.mode & " .RSS_MODE_DELETED_STATE.")" 176 . (hidePrivate()? " and not(unread & ".RSS_MODE_PRIVATE_STATE.")":"");176 . (hidePrivate()? " and i.flgprivate=0":""); 177 177 178 178 //echo $sql; … … 219 219 $sql = "select f.id, f.name, count(*) as cnt " 220 220 ." from " 221 .getTable('item ') ." i, "221 .getTable('item2user') ." i2u, " 222 222 .getTable('channels') . " c, " 223 223 .getTable('folders') ." f " 224 ." where i .unread & ". RSS_MODE_UNREAD_STATE225 ." and not(i.unread & ". RSS_MODE_DELETED_STATE .")";224 ." where i2u.flgunread =1 " 225 ." and i2u.flgdeleted=0 "; 226 226 if (hidePrivate()) { 227 $sql .=" and not(unread & " . RSS_MODE_PRIVATE_STATE .")";227 $sql .=" and i2u.flgprivate =0 "; 228 228 } 229 229 $sql .= " and not(c.mode & " . RSS_MODE_DELETED_STATE .") "; 230 $sql .= " and i .cid=c.id and c.parent=f.id "230 $sql .= " and i2u.fkcid=c.id and c.parent=f.id " 231 231 ." group by f.id"; 232 232 _pf('query'); … … 266 266 $this -> feedCount = rss_num_rows($res); 267 267 268 $ucres = rss_query ("select cid, count(*) from " .getTable("item") 269 ." where unread & " . RSS_MODE_UNREAD_STATE 270 . " and not(unread & " . RSS_MODE_DELETED_STATE .") group by cid"); 268 $ucres = rss_query ("select fkcid, count(*) from " .getTable("item2user") 269 ." i2u where i2u.flgunread=1 and i2u.flgdeleted=0 and i2u.fkuid=" .rss_user_id() ." group by i2u.fkcid"); 271 270 $uc = array(); 272 271 while (list($uccid,$ucuc) = rss_fetch_row($ucres)) { -
branches/multiuser/cls/items.php
r1475 r1524 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;65 //$this->flags = $unread; 66 66 if ($title) { 67 67 $this->title = $title; … … 87 87 $this -> tags=array(); 88 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;89 $this ->isUnread = $unread; 90 $this ->isPrivate = $private; 91 $this ->isDeleted = $deleted; 92 $this ->isSticky = $sticky; 93 $this ->isFlag = $flagged; 94 94 //$this -> key = md5(rand(0,10000)); 95 95 … … 193 193 $this->items[] = $item; 194 194 195 if ((!$this -> hasUnreadItems) && $item-> flags & RSS_MODE_UNREAD_STATE) {195 if ((!$this -> hasUnreadItems) && $item->isUnread) { 196 196 $this -> hasUnreadItems = true; 197 197 } … … 260 260 261 261 // Predefined alternate ordering 262 $this -> ORDER_BY_UNREAD_FIRST = " order by i .unread & " . RSS_MODE_UNREAD_STATE . "desc, ";262 $this -> ORDER_BY_UNREAD_FIRST = " order by i2u.flgunread desc, "; 263 263 if (getConfig('rss.config.absoluteordering')) { 264 264 $this -> ORDER_BY_UNREAD_FIRST .= " f.position asc, c.position asc"; … … 283 283 284 284 _pf('ItemList::populate()'); 285 $this -> _sqlActualWhat = " i.title, c.title, c.id, i.unread, " 285 $this -> _sqlActualWhat = " i.title, c.title, c.id, " 286 ."i2u.flgunread, i2u.flgprivate, i2u.flgsticky, i2u.flgdeleted, i2u.flgflagged," 286 287 ."i.url, i.enclosure, i.author, i.description, c.icon, " 287 288 ." unix_timestamp(ifnull(i.pubdate,i.added)) as ts, " 288 ." i.pubdate is not null as ispubdate, i.id, r.rating "; 289 $this -> _sqlActualFrom = getTable("item") ." i " 290 ." left join " 291 . getTable("rating") ." r on (i.id = r.iid), " 292 .getTable("channels")." c, " 293 .getTable("folders") ." f "; 294 295 $this -> _sqlActualWhere = " i.cid = c.id and " 296 ." f.id=c.parent and ". (false == $includeDeprecated ? " not(c.mode & ".RSS_MODE_DELETED_STATE.") and " : "") 297 ." not(i.unread & ".RSS_MODE_DELETED_STATE.") and "; 298 299 300 289 ." i.pubdate is not null as ispubdate, i.id " 290 //.", r.rating " 291 ; 292 293 $this -> _sqlActualFrom = "" 294 .getTable('item2user') . " i2u " 295 ." left join " 296 .getTable("item") ." i " 297 ." on (i2u.fkiid = i.id) left join " 298 //." left join " 299 //. 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) "; 302 303 304 $this -> _sqlActualWhere = " i2u.fkuid= " . $GLOBALS['rssuser']->getUserId() . " "; 301 305 if (hidePrivate()) { 302 $this -> _sqlActualWhere .= " not(i.unread & ".RSS_MODE_PRIVATE_STATE.") and "; 303 } 306 $this -> _sqlActualWhere .= " and i2u.flgprivate=0 "; 307 } 308 309 $this -> _sqlActualWhere .= " and " 310 . (false == $includeDeprecated ? " not(c.mode & ".RSS_MODE_DELETED_STATE.") and " : "") 311 ." i2u.flgdeleted=0 and "; 312 313 314 315 304 316 305 317 if ($this -> _sqlActualWhere) { … … 347 359 $this -> _sqlActualLimit = " $startItem, $itemCount"; 348 360 349 $sql = " select "361 $sql = "\nselect\n\t " 350 362 .$this -> _sqlActualWhat 351 . " from"363 . " \nfrom\n\t " 352 364 .$this -> _sqlActualFrom 353 . " where"365 . " \nwhere\n\t " 354 366 . $this -> _sqlActualWhere 355 . " order by"367 . " \norder by\n\t " 356 368 . $this -> _sqlActualOrder 357 . " limit "369 . " \nlimit " 358 370 . $this -> _sqlActualLimit; 359 371 360 // echo $sql;372 //die( $sql ); 361 373 $this -> iids = array(); 362 $res = $GLOBALS['rss_db']->rss_query($sql);374 $res = rss_query($sql); 363 375 $this -> rowCount = $GLOBALS['rss_db']->rss_num_rows($res); 364 376 $prevCid = -1; 365 377 $curIdx = 0; 366 378 $f=null; 367 while (list ($ititle_, $ctitle_, $cid_, $iunread_, $i url_, $ienclosure_, $iauthor_, $idescr_, $cicon_, $its_, $iispubdate_, $iid_, $rrating_) = $GLOBALS['rss_db']->rss_fetch_row($res)) {379 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)) { 368 380 369 381 // Built a new Item 370 $i = new Item($iid_, $ititle_, $iurl_, $ienclosure_, $cid_, $iauthor_, $idescr_, $its_, $iispubdate_, $iunread_, $ rrating_);382 $i = new Item($iid_, $ititle_, $iurl_, $ienclosure_, $cid_, $iauthor_, $idescr_, $its_, $iispubdate_, $iunread_, $iprivate_, $isticky_, $iflagged_); 371 383 372 384 // no dupes, please … … 400 412 // Some stats... 401 413 $this -> itemCount++; 402 if ($iunread_ & RSS_MODE_UNREAD_STATE) {414 if ($iunread_) { 403 415 $this -> unreadCount++; 404 416 $this -> unreadIids[] = $iid_; -
branches/multiuser/cls/update.php
r1516 r1524 100 100 if (!hidePrivate() || $ignorePrivate) { 101 101 if (count($newIds) > 0 && getConfig('rss.config.markreadonupdate')) { 102 rss_query("update ".getTable("item")." set unread = unread & " 103 .SET_MODE_READ_STATE." where unread & ".RSS_MODE_UNREAD_STATE 104 ." and id not in (".implode(",", $newIds).")"); 102 rss_query("update ".getTable("item2user")." i2u set i2u.flgunread=0 where i2u.flgunread=1" 103 ." and i2u.fkiid not in (".implode(",", $newIds).")"); 105 104 } 106 105 } … … 413 412 ."<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n" 414 413 ."<html>\n"."<head>\n"."<title>Redirecting...</title>\n" 415 ."<meta http-equiv=\"refresh\" content=\"0;url=index.php\"/>\n"414 ."<meta http-equiv=\"refresh\" content=\"0;url=index.php\"/>\n" 416 415 ."</head>\n"."<body/>\n"."</html>"; 417 416 … … 475 474 476 475 var ids = new Array(); 477 kids = document.getElementById('updatetable').getElementsByTagName("tr");476 var kids = document.getElementById('updatetable').getElementsByTagName("tr"); 478 477 var i=0; 479 478 var added = 0; … … 572 571 573 572 function ajaxUpdate(batch) { 574 sBatch='';573 var sBatch=''; 575 574 //alert(batch.length); 576 575 for(var i=0;i<batch.length;i++) { -
branches/multiuser/cls/user.php
r1461 r1524 224 224 return $this -> _level; 225 225 } 226 227 function getUserId() { 228 return $this -> _uid; 229 } 226 230 } 227 231 -
branches/multiuser/cls/wrappers/user.php
r1461 r1524 34 34 } 35 35 36 function rss_user_id() { 37 return $GLOBALS['rssuser'] -> getUserId(); 38 } 39 36 40 function rss_user_logout() { 37 41 $GLOBALS['rssuser'] -> logout(); -
branches/multiuser/constants.php
r1502 r1524 177 177 // Profiling 178 178 // - The profiling information is "html commented out" at the end of every html page 179 //define('PROFILING', 1);180 //define('PROFILING_DB', 1);179 define('PROFILING', 1); 180 define('PROFILING_DB', 1); 181 181 182 182 ?> -
branches/multiuser/feed.php
r1509 r1524 317 317 /* Redirect! If this feed has more unread items, self-redirect */ 318 318 319 $sql = "select count(*) from " .getTable("item ") . " i"320 ." where i .unread & " .RSS_MODE_UNREAD_STATE321 ." and i .cid=$cid"322 ." and not(i.unread & " . RSS_MODE_DELETED_STATE .")"319 $sql = "select count(*) from " .getTable("item2user") . " i2u " 320 ." where i2u.flgunread=1 " 321 ." and i2u.fkcid=$cid" 322 ." and i2u.flgdeleted=0 " 323 323 ; 324 324 if (hidePrivate()) { 325 $sql .=" and not(i.unread & " . RSS_MODE_PRIVATE_STATE .")";325 $sql .=" and i2u.flgprivate =0"; 326 326 } 327 327 list($hasMoreUnreads) = rss_fetch_row(rss_query($sql)); … … 363 363 364 364 // 2: Get the unread count for each feed: 365 $sql = "select cid, count(*) from " .getTable('item')366 ." where (unread & ".RSS_MODE_UNREAD_STATE . ")"367 ." and not (unread & " .RSS_MODE_DELETED_STATE . ")";365 $sql = "select fkcid, count(*) from " .getTable('item2user') 366 ." i2u where i2u.flgunread=1 " 367 ." and i2u.flgdeletd=0"; 368 368 if (hidePrivate()) { 369 $sql .= " and not (i.unread & " . RSS_MODE_PRIVATE_STATE . ")";370 } 371 $sql .= " group by cid";369 $sql .= " and i2u.flgprivate=0 "; 370 } 371 $sql .= " group by i2u.fkcid"; 372 372 $res = rss_query($sql); 373 373 while (list($cid__,$uc__) = rss_fetch_row($res)) { … … 424 424 425 425 426 $sql = "update " .getTable('item ')427 . " set unread = unread & ".SET_MODE_READ_STATE428 . " where cid in (" .implode(',', $cids_) . ") ";426 $sql = "update " .getTable('item2user') 427 . " set unread = 0 " 428 . " where fkcid in (" .implode(',', $cids_) . ") "; 429 429 unset($cids_); 430 430 if (count($IdsToMarkAsRead)) { 431 $sql .= " and id in (" . implode(',',$IdsToMarkAsRead) .")";431 $sql .= " and fkiid in (" . implode(',',$IdsToMarkAsRead) .")"; 432 432 } 433 433 … … 450 450 if( $found || !$first_fid ) { 451 451 $sql = "select count(*) from " 452 .getTable('item ') ." i, "452 .getTable('item2user') ." i2u, " 453 453 .getTable('channels') ." c " 454 ." where i.unread & " .RSS_MODE_UNREAD_STATE ." and i.cid = c.id and c.parent = $fid__"; 454 ." where i2u.flgunread=1 and i2u.fkcid = c.id and c.parent = $fid__" 455 ." and i2u.fkuid=" . rss_user_id(); 455 456 if (hidePrivate()) { 456 $sql .= " and not(i.unread & " . RSS_MODE_PRIVATE_STATE . ")";457 $sql .= " and i2u.flgprivate=0 "; 457 458 } 458 459 … … 498 499 } 499 500 500 $sql = "update " .getTable('item') 501 . " set unread = unread & ".SET_MODE_READ_STATE 502 . " where cid in (" .implode(',',$fids_). ")"; 501 $sql = "update " .getTable('item2user') 502 . " set unread = 0 " 503 . " where fkcid in (" .implode(',',$fids_). ")" 504 . " and fkuid=". rss_user_id(); 505 503 506 504 507 if (count($IdsToMarkAsRead)) { 505 $sql .= " and id in (" . implode(',',$IdsToMarkAsRead) .")";508 $sql .= " and fkiid in (" . implode(',',$IdsToMarkAsRead) .")"; 506 509 } 507 510 … … 521 524 if( $found || !$first_vfid ) { 522 525 // check for unread items in next virtual folder 523 $sql = "select count(distinct(i. id)) as cnt from "526 $sql = "select count(distinct(i.fkiid)) as cnt from " 524 527 .getTable('metatag') ." left join " 525 .getTable('item ') . "i on (i.cid=fid) "528 .getTable('item2user') . "i2u on (i2u.fkcid=fid) " 526 529 ."where tid = $tid__ and ttype = 'channel' " 527 ." and (i.unread & ".RSS_MODE_UNREAD_STATE.") " 528 ."and not(i.unread & ".RSS_MODE_DELETED_STATE.")"; 530 ." and i2u.flgunread=1 " 531 ." and i2u.fkuid=" .rss_user_id() 532 ." and i2u.flgdeleted=0 "; 529 533 if (hidePrivate()) { 530 $sql .= " and not(i.unread & " . RSS_MODE_PRIVATE_STATE . ")";534 $sql .= " and i2u.flgprivate=0 "; 531 535 } 532 536 list($c) = rss_fetch_row(rss_query($sql)); … … 682 686 // "item mode" 683 687 $res = rss_query ("select c.title, c.icon, i.title from " . getTable("channels") ." c, " 684 .getTable("item") ." i where c.id = $cid and i.cid=c.id and i.id=$iid" 685 ." and not(i.unread & " . RSS_MODE_DELETED_STATE .") " 688 .getTable("item") ." i, " 689 .getTable('item2user') ." i2u where i2u.fkiid=i.id and " 690 ." c.id = $cid and i.cid=c.id and i.id=$iid" 691 ." and i2u.flgdeleted=0 " 686 692 ); 687 693 … … 726 732 } else { 727 733 // archives, folders, channels 728 $sql = "select count(*) from " . getTable('item ') . " where"729 ." (unread & " . RSS_MODE_UNREAD_STATE .")"730 ." and not(unread & " . RSS_MODE_DELETED_STATE .")";734 $sql = "select count(*) from " . getTable('item2user') 735 . " i2u left join ".getTable('item')." i on (i2u.fkiid=i.id) where" 736 ." i2u.flgunread=1 and i2u.flgdeleted=0"; 731 737 732 738 //archive? … … 739 745 } 740 746 if ($cids && count($cids)) { 741 $sql .= " and cid in (".implode(',',$cids).")";747 $sql .= " and i.cid in (".implode(',',$cids).")"; 742 748 } 743 749 list($unreadCount) = rss_fetch_row(rss_query($sql)); … … 760 766 $hint = ITEM_SORT_HINT_MIXED; 761 767 if ($do_show == SHOW_UNREAD_ONLY) { 762 $sqlWhere .= " and (i.unread & " . RSS_MODE_UNREAD_STATE .")";768 $sqlWhere .= " and i2u.flgunread=1 "; 763 769 $hint = ITEM_SORT_HINT_UNREAD; 764 770 } … … 787 793 $sqlWhere = "i.cid = $cid"; 788 794 if ($do_show == SHOW_UNREAD_ONLY) { 789 $sqlWhere .= " and (i.unread & " . RSS_MODE_UNREAD_STATE .")";795 $sqlWhere .= " and i2u.flgunread=1 "; 790 796 $hint = ITEM_SORT_HINT_UNREAD; 791 797 } -
branches/multiuser/index.php
r1424 r1524 47 47 && !hidePrivate()) { 48 48 49 $sql = "update " .getTable("item") . " set unread=unread & " 50 .SET_MODE_READ_STATE ." where unread & " . RSS_MODE_UNREAD_STATE; 49 $sql = "update " .getTable("item2user") . " i2u set i2u.flgunread=0 where i2u.flgunread=1 and i2u.fkuid=" .rss_user_id(); 50 51 51 52 52 53 if (hidePrivate()) { 53 $sql .= " and not(unread & " . RSS_MODE_PRIVATE_STATE . ")";54 $sql .= " and i2u.flgprivate=0 "; 54 55 } 55 56 56 57 if (array_key_exists('markreadids',$_POST)) { 57 $sql .= " and i d in (" . rss_real_escape_string($_POST['markreadids']) .")";58 $sql .= " and i2u.fkiid in (" . rss_real_escape_string($_POST['markreadids']) .")"; 58 59 } 59 60 rss_query( $sql ); … … 122 123 $numItems = getConfig('rss.output.frontpage.numitems'); 123 124 124 /* 125 $hiddenIds = getHiddenChannelIds(); 126 if (count($hiddenIds)) { 127 $sqlWhereHidden = " and c.id not in (" . implode(',',$hiddenIds) . ") "; 128 } else { 129 $sqlWhereHidden = ""; 130 } 131 */ 132 $sqlWhereHidden = ""; 133 134 $unreadItems -> populate("i.unread & " . RSS_MODE_UNREAD_STATE . $sqlWhereHidden, "", 0, $numItems,ITEM_SORT_HINT_UNREAD); 135 125 126 $unreadItems -> populate(" i2u.flgunread=1 ", "", 0, $numItems,ITEM_SORT_HINT_UNREAD); 127 //var_dump($unreadItems); 136 128 _pf('end populate unread items'); 137 129 if ($unreadItems ->unreadCount) { … … 187 179 $res1=rss_query($sql); 188 180 while ($readItems->itemCount < $limit && (list($cid) = rss_fetch_row($res1))) { 189 $sqlWhere = " not(i.unread & ". RSS_MODE_UNREAD_STATE .")and i.cid= $cid";181 $sqlWhere = " i2u.flgunread=0 and i.cid= $cid"; 190 182 $sqlWhere .= " and i.pubdate <= now() "; 191 183 … … 200 192 return; 201 193 } 202 $sqlWhere = " not(i.unread & ". RSS_MODE_UNREAD_STATE .")";194 $sqlWhere = " i2u.flgunread=0 "; 203 195 $sqlWhere .= " and i.pubdate <= now() "; 204 196 // $sqlWhere .= $sqlWhereHidden; -
branches/multiuser/schema.php
r1520 r1524 50 50 "dashboard" => trim(getTable("dashboard")), 51 51 "properties" => trim(getTable("properties")), 52 "item2user" => trim(getTable("item2user")), 52 53 53 54 ); … … 64 65 } 65 66 } 66 67 67 $updated = 0; 68 68 if (count($missing_tables) > 0) { … … 258 258 // guid of an item - added in 0.5.3 259 259 rss_query('alter table ' . getTable('item') . ' add column guid text null'); 260 rss_query('alter table ' . getTable('item') . ' add index `guid` (`guid`(10))');260 rss_query('alter table ' . getTable('item') . " add index 'guid' ('guid'(10))"); 261 261 if (rss_is_sql_error(RSS_SQL_ERROR_NO_ERROR)) { 262 262 $updated++; … … 681 681 } 682 682 683 684 /////////////////////////////////////////////////////////////////////////////// 685 686 function _init_item2user() { 687 $table = getTable('item2user'); 688 rss_query_wrapper ('DROP TABLE IF EXISTS ' . $table, true, true); 689 $sql_create = str_replace('__table__',$table, <<< _SQL_ 690 CREATE TABLE __table__ ( 691 fkiid bigint(16) NOT NULL, 692 fkuid bigint(16) NOT NULL, 693 fkcid bigint(11) NOT NULL, 694 flgunread tinyint(1) NOT NULL default '1', 695 flgsticky tinyint(1) NOT NULL default '0', 696 flgprivate tinyint(1) NOT NULL default '0', 697 flgdeleted tinyint(1) NOT NULL default '0', 698 flgflagged tinyint(1) NOT NULL default '0', 699 KEY flgunread (flgunread), 700 KEY flgsticky (flgsticky), 701 KEY flgprivate (flgprivate), 702 KEY flgdeleted (flgdeleted), 703 KEY flgflagged (flgflagged), 704 KEY fkuid (fkuid), 705 KEY iids (fkiid) 706 ) ENGINE=MyISAM; 707 _SQL_ 708 ); 709 710 rss_query_wrapper($sql_create, false, true); 711 712 if (!rss_is_sql_error(RSS_SQL_ERROR_NO_ERROR)) { 713 rss_error('The ' . $table . 'table doesn\'t exist and I couldn\'t create it! Please create it manually.', RSS_ERROR_ERROR); 714 return 0; 715 } else { 716 $fillSql = "insert into $table (fkiid,fkuid,fkcid,flgunread,flgsticky,flgprivate,flgdeleted,flgflagged) " 717 ."select id, " . rss_user_id() . ", cid, " 718 ." unread & ".RSS_MODE_UNREAD_STATE." = ".RSS_MODE_UNREAD_STATE.", " 719 ." unread & ".RSS_MODE_STICKY_STATE." = ".RSS_MODE_STICKY_STATE.", " 720 ." unread & ".RSS_MODE_PRIVATE_STATE." = ".RSS_MODE_PRIVATE_STATE.", " 721 ." unread & ".RSS_MODE_DELETED_STATE." = ".RSS_MODE_DELETED_STATE.", " 722 ." unread & ".RSS_MODE_FLAG_STATE." = ".RSS_MODE_FLAG_STATE." from " .getTable('item'); 723 rss_query_wrapper($fillSql, false, true); 724 725 return rss_is_sql_error(RSS_SQL_ERROR_NO_ERROR); 726 } 727 } 728 729 730 683 731 ///////////////////////////////////////////////////////////////////////////////
