Fossil

Check-in [a388e9da]
Login

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

Overview
Comment:timeline descendants view now properly behaves when there are no descendents, and it also sigularizes the word 'descendents' when there is only one.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a388e9da2e292647f5de9a681013630c57dd74bd
User & Date: stephan 2009-12-26 13:43:34
Context
2009-12-26
15:30
removed an extraneous pair of row/cell closing tags. Fixed TH tags which were closed with TD instead of TH. check-in: 06b964a0 user: stephan tags: trunk
13:43
timeline descendants view now properly behaves when there are no descendents, and it also sigularizes the word 'descendents' when there is only one. check-in: a388e9da user: stephan tags: trunk
2009-12-20
21:34
Fix a comment formatting error in the recent skins.c changes. check-in: 4f24adde user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/timeline.c.

482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
    zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d",
                         p_rid ? p_rid : d_rid);
    blob_appendf(&sql, " AND event.objid IN ok");
    nd = 0;
    if( d_rid ){
      compute_descendants(d_rid, nEntry+1);
      nd = db_int(0, "SELECT count(*)-1 FROM ok");
      if( nd>0 ){
        db_multi_exec("%s", blob_str(&sql));
        blob_appendf(&desc, "%d descendants", nd);
      }
      timeline_add_dividers(  
        db_text("1","SELECT datetime(mtime,'localtime') FROM event"
                    " WHERE objid=%d", d_rid)
      );
      db_multi_exec("DELETE FROM ok");
    }
    if( p_rid ){
      compute_ancestors(p_rid, nEntry+1);







|

|

|







482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
    zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d",
                         p_rid ? p_rid : d_rid);
    blob_appendf(&sql, " AND event.objid IN ok");
    nd = 0;
    if( d_rid ){
      compute_descendants(d_rid, nEntry+1);
      nd = db_int(0, "SELECT count(*)-1 FROM ok");
      if( nd>=0 ){
        db_multi_exec("%s", blob_str(&sql));
        blob_appendf(&desc, "%d descendant%s", nd,(1==nd)?"":"s");
      }
      timeline_add_dividers(
        db_text("1","SELECT datetime(mtime,'localtime') FROM event"
                    " WHERE objid=%d", d_rid)
      );
      db_multi_exec("DELETE FROM ok");
    }
    if( p_rid ){
      compute_ancestors(p_rid, nEntry+1);