Fossil

Check-in [0ee34c90]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make it work in JSON timeline as well
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | hidden-tag
Files: files | file ages | folders
SHA1:0ee34c90d52e2d4d888ebd29fa085bb9196bc6f3
User & Date: jan.nijtmans 2013-09-12 13:03:08
Context
2013-09-12
21:05
don't use a CROSS JOIN, but a normal JOIN. Is that correct? Otherwise it's incredible slow......, but I'm not sure. check-in: d7436c4e user: jan.nijtmans tags: hidden-tag
13:03
Make it work in JSON timeline as well check-in: 0ee34c90 user: jan.nijtmans tags: hidden-tag
2013-09-11
15:16
Don't display anything marked "hidden" in the timeline. check-in: ba7056b2 user: jan.nijtmans tags: hidden-tag
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/json_timeline.c.

163
164
165
166
167
168
169


170
171
172
173
174
175
176
177
178
179
180
  if(tagid<=0){
    return -1;
  }
  if(pPayload){
    cson_object_set( pPayload, zBranch ? "branch" : "tag", json_new_string(zTag) );
  }
  blob_appendf(pSql,


               " AND ("
               " EXISTS(SELECT 1 FROM tagxref"
               "        WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)",
               tagid);
  if(zBranch){
    /* from "r" flag code in page_timeline().*/
    blob_appendf(pSql,
                 " OR EXISTS(SELECT 1 FROM plink CROSS JOIN tagxref ON rid=cid"
                 "    WHERE tagid=%d AND tagtype>0 AND pid=blob.rid)"
                 " AND NOT EXISTS(SELECT 1 FROM plink CROSS JOIN tagxref ON rid=cid"
                 "    WHERE tagid=%d AND tagtype>0 AND pid=blob.rid)",







>
>



|







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
  if(tagid<=0){
    return -1;
  }
  if(pPayload){
    cson_object_set( pPayload, zBranch ? "branch" : "tag", json_new_string(zTag) );
  }
  blob_appendf(pSql,
               " AND NOT EXISTS(SELECT 1 FROM plink CROSS JOIN tagxref ON rid=blob.rid"
               "    WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)"
               " AND ("
               " EXISTS(SELECT 1 FROM tagxref"
               "        WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)",
               TAG_HIDDEN, tagid);
  if(zBranch){
    /* from "r" flag code in page_timeline().*/
    blob_appendf(pSql,
                 " OR EXISTS(SELECT 1 FROM plink CROSS JOIN tagxref ON rid=cid"
                 "    WHERE tagid=%d AND tagtype>0 AND pid=blob.rid)"
                 " AND NOT EXISTS(SELECT 1 FROM plink CROSS JOIN tagxref ON rid=cid"
                 "    WHERE tagid=%d AND tagtype>0 AND pid=blob.rid)",