Fossil

Check-in [aa867868]
Login

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

Overview
Comment:Fix Older/Newer buttons if showing timeline before beginning or after end of existing timeline
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | baruch_timeline_fixes
Files: files | file ages | folders
SHA1:aa867868d8849f33b46d3890a39669a944ad56a5
User & Date: baruch 2016-01-21 21:40:34
Original Comment: Fix Older/Newer buttons if sowing timeline before beginning or after end of timeline
Context
2016-01-24
10:13
Fix Older/Newer buttons if showing exactly up to the first/last event check-in: 0e782b3d user: baruch tags: ready-for-review, baruch_timeline_fixes
2016-01-21
21:40
Fix Older/Newer buttons if showing timeline before beginning or after end of existing timeline check-in: aa867868 user: baruch tags: baruch_timeline_fixes
10:32
Fix memory leak from previous commit Closed-Leaf check-in: 9ab7122d user: baruch tags: pending-review
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/timeline.c.

1764
1765
1766
1767
1768
1769
1770



1771
1772
1773
1774
1775
1776



1777
1778
1779
1780
1781
1782
1783
          zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/");
          timeline_submenu(&url, "Newer", "a", zDate, "c");
          free(zDate);
        }
      }else{
        if( zAfter || n==nEntry ){
          zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/");



          timeline_submenu(&url, "Older", "b", zDate, "a");
          zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "a", 0));
          free(zDate);
        }
        if( zBefore || (zAfter && n==nEntry) ){
          zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/");



          timeline_submenu(&url, "Newer", "a", zDate, "b");
          free(zDate);
        }
      }
      if( zType[0]=='a' || zType[0]=='c' ){
        if( (tmFlags & TIMELINE_UNHIDE)==0 ){
          timeline_submenu(&url, "Unhide", "unhide", "", 0);







>
>
>






>
>
>







1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
          zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/");
          timeline_submenu(&url, "Newer", "a", zDate, "c");
          free(zDate);
        }
      }else{
        if( zAfter || n==nEntry ){
          zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/");
          if( !zDate || !zDate[0] ){
            zDate = mprintf("%s", zAfter);
          }
          timeline_submenu(&url, "Older", "b", zDate, "a");
          zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "a", 0));
          free(zDate);
        }
        if( zBefore || (zAfter && n==nEntry) ){
          zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/");
          if( !zDate || !zDate[0] ){
            zDate = mprintf("%s", (zBefore ? zBefore : zAfter));
          }
          timeline_submenu(&url, "Newer", "a", zDate, "b");
          free(zDate);
        }
      }
      if( zType[0]=='a' || zType[0]=='c' ){
        if( (tmFlags & TIMELINE_UNHIDE)==0 ){
          timeline_submenu(&url, "Unhide", "unhide", "", 0);