Changeset 1544 for trunk/gregarius/cls
- Timestamp:
- 08/24/06 01:14:02 (2 years ago)
- Location:
- trunk/gregarius/cls
- Files:
-
- 6 modified
-
alltags.php (modified) (2 diffs)
-
categories.php (modified) (3 diffs)
-
channels.php (modified) (4 diffs)
-
update.php (modified) (1 diff)
-
wrappers/searchform.php (modified) (2 diffs)
-
wrappers/toolkit.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/cls/alltags.php
r1181 r1544 77 77 if($this -> type == 'channel'){ 78 78 $sql .= " left join " . getTable('channels') . " c on (fid=c.id)," 79 . getTable('tag')." t "." wheretid=t.id "80 . " andttype = 'channel'";79 ."inner join " . getTable('tag')." t "." on tid=t.id " 80 . " where ttype = 'channel'"; 81 81 }else{ 82 82 $sql .= " left join ".getTable('item')." i on (fid=i.id)," 83 . getTable('tag')." t "." wheretid=t.id "84 ." andttype = 'item'";83 ."inner join " . getTable('tag')." t "." on tid=t.id " 84 ." where ttype = 'item'"; 85 85 } 86 86 … … 121 121 $cntr ++; 122 122 } 123 124 125 123 } 126 124 -
trunk/gregarius/cls/categories.php
r1519 r1544 109 109 //get unread count per folder 110 110 $sql = "select m.tid, t.tag, count(*) as cnt " 111 ." from " 112 .getTable('item') ." i, " 113 .getTable('channels') . " c, " 114 .getTable('metatag') ." m, " 115 .getTable('tag') . " t" 111 ." from " . getTable('item') ." i " 112 ." inner join " . getTable('channels') . " c on c.id = i.cid " 113 ." inner join " . getTable('metatag') ." m on m.fid = c.id " 114 ." inner join " . getTable('tag') . " t on t.id = m.tid " 116 115 ." where i.unread & ". RSS_MODE_UNREAD_STATE 117 116 ." and not(i.unread & ". RSS_MODE_DELETED_STATE .")"; … … 120 119 } 121 120 $sql .= " and not(c.mode & " . RSS_MODE_DELETED_STATE .") "; 122 $sql .= " and i.cid=c.id and c.id=m.fid and m.tid=t.id"123 121 ." group by m.tid"; 124 122 _pf('query'); … … 142 140 $sql = "select " 143 141 ." c.id, c.title, c.url, c.siteurl, t.tag, c.parent, c.icon, c.descr, c.mode, t.id " 144 ." from " 145 .getTable('channels') ." c, " 146 .getTable('metatag') ." m, " 147 .getTable('tag') . " t " 148 ." where m.fid = c.id and m.ttype = 'channel' " 149 ." and m.tid = t.id "; 150 142 ." from " . getTable('channels') ." c " 143 ." inner join " . getTable('metatag') ." m m.fid = c.id " 144 ." inner join " . getTable('tag') . " t on t.id = m.tid " 145 ." where m.ttype = 'channel' " 151 146 152 147 if (hidePrivate()) { -
trunk/gregarius/cls/channels.php
r1539 r1544 169 169 170 170 _pf(' ... totalCount'); 171 $sql = 172 "select count(*) from ".getTable("item") . "i ," . getTable('channels') . " c "173 174 ." where i.cid=c.id andnot(i.unread & ".RSS_MODE_DELETED_STATE.") "175 ." and not (c.mode & " .RSS_MODE_DELETED_STATE.")"171 $sql ="select count(*) from ".getTable("item") . "i " 172 ."inner join " . getTable('channels') . " c " 173 ." on c.id = i.cid " 174 ." where not(i.unread & ".RSS_MODE_DELETED_STATE.") " 175 ." and not (c.mode & " .RSS_MODE_DELETED_STATE.")" 176 176 . (hidePrivate()? " and not(unread & ".RSS_MODE_PRIVATE_STATE.")":""); 177 177 … … 218 218 //get unread count per folder 219 219 $sql = "select f.id, f.name, count(*) as cnt " 220 ." from " 221 .getTable('item') ." i, " 222 .getTable('channels') . " c, " 223 .getTable('folders') ." f " 220 ." from " .getTable('item') ." i " 221 ." inner join " . getTable('channels') . " c on c.id = i.cid " 222 ." inner join " . getTable('folders') ." f on f.id = c.parent " 224 223 ." where i.unread & ". RSS_MODE_UNREAD_STATE 225 224 ." and not(i.unread & ". RSS_MODE_DELETED_STATE .")"; … … 228 227 } 229 228 $sql .= " and not(c.mode & " . RSS_MODE_DELETED_STATE .") "; 230 $sql .= " and i.cid=c.id and c.parent=f.id " 231 ." group by f.id"; 229 $sql .= " group by f.id"; 232 230 _pf('query'); 233 231 $res = rss_query($sql); … … 249 247 function populate() { 250 248 _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 "." wheref.id = c.parent";249 $sql = "select "." c.id, c.title, c.url, c.siteurl, f.name, c.parent, c.icon, c.descr, c.mode "." from ".getTable("channels")." c " 250 ."inner join " . getTable("folders")." f on f.id = c.parent"; 253 251 254 252 if (hidePrivate()) { -
trunk/gregarius/cls/update.php
r1516 r1544 76 76 77 77 function populate($updatePrivateAlso = false) { 78 $sql = "select c.id, c.url, c.title from ".getTable("channels") . " c, " 79 . getTable('folders') . " f "; 80 $sql .= " where not(c.mode & ".RSS_MODE_DELETED_STATE.") "; 81 $sql .= " and c.parent = f.id "; 78 $sql = "select c.id, c.url, c.title from ".getTable("channels") . " c " 79 . " inner join " . getTable('folders') . " f on f.id = c.parent " 80 . " where not(c.mode & ".RSS_MODE_DELETED_STATE.") "; 82 81 83 82 if (hidePrivate() && !$updatePrivateAlso) { -
trunk/gregarius/cls/wrappers/searchform.php
r1384 r1544 26 26 # 27 27 ############################################################################### 28 29 28 30 29 function rss_search_title() { … … 99 98 $sql = "select " 100 99 ." c.id, c.title, f.name, f.id " 101 ." from " . getTable("channels") ." c, " . getTable("folders"). " f " 102 ." where f.id=c.parent "; 100 ." from " . getTable("channels") ." c " 101 ." inner join " . getTable("folders"). " f " 102 ." on f.id = c.parent "; 103 103 104 104 if (hidePrivate()) { -
trunk/gregarius/cls/wrappers/toolkit.php
r1529 r1544 55 55 $sql = "select " 56 56 ." c.id, c.title, f.name, f.id " 57 ." from " . getTable("channels") ." c, " . getTable("folders"). " f " 58 ." where f.id=c.parent "; 57 ." from " . getTable("channels") ." c " 58 ." inner join " . getTable("folders"). " f " 59 ." on f.id = c.parent "; 59 60 60 61 if (hidePrivate()) {
