Fossil SCM

Add the oldestfirst boolean query parameter to the /timeline page.

drh 2023-04-22 16:01 trunk
Commit ee8d34f5aa9d948d1ac74113e8ceffc16e0d02908b862b9322b0bee57d3140bd
1 file changed +6 -1
+6 -1
--- src/timeline.c
+++ src/timeline.c
@@ -1619,10 +1619,11 @@
16191619
** to see all changes for the current year.
16201620
** days=N Show events over the previous N days
16211621
** datefmt=N Override the date format: 0=HH:MM, 1=HH:MM:SS,
16221622
** 2=YYYY-MM-DD HH:MM:SS, 3=YYMMDD HH:MM, and 4 means "off".
16231623
** bisect Show the check-ins that are in the current bisect
1624
+** oldestfirst Show events oldest first.
16241625
** showid Show RIDs
16251626
** showsql Show the SQL text
16261627
**
16271628
** p= and d= can appear individually or together. If either p= or d=
16281629
** appear, then u=, y=, a=, and b= are ignored.
@@ -2766,11 +2767,15 @@
27662767
if( useDividers && zMark && zMark[0] ){
27672768
double r = symbolic_name_to_mtime(zMark, 0);
27682769
if( r>0.0 && !selectedRid ) selectedRid = timeline_add_divider(r);
27692770
}
27702771
blob_zero(&sql);
2771
- db_prepare(&q, "SELECT * FROM timeline ORDER BY sortby DESC /*scan*/");
2772
+ if( PB("oldestfirst") ){
2773
+ db_prepare(&q, "SELECT * FROM timeline ORDER BY sortby ASC /*scan*/");
2774
+ }else{
2775
+ db_prepare(&q, "SELECT * FROM timeline ORDER BY sortby DESC /*scan*/");
2776
+ }
27722777
if( fossil_islower(desc.aData[0]) ){
27732778
desc.aData[0] = fossil_toupper(desc.aData[0]);
27742779
}
27752780
if( zBrName ){
27762781
if( !PB("nowiki")
27772782
--- src/timeline.c
+++ src/timeline.c
@@ -1619,10 +1619,11 @@
1619 ** to see all changes for the current year.
1620 ** days=N Show events over the previous N days
1621 ** datefmt=N Override the date format: 0=HH:MM, 1=HH:MM:SS,
1622 ** 2=YYYY-MM-DD HH:MM:SS, 3=YYMMDD HH:MM, and 4 means "off".
1623 ** bisect Show the check-ins that are in the current bisect
 
1624 ** showid Show RIDs
1625 ** showsql Show the SQL text
1626 **
1627 ** p= and d= can appear individually or together. If either p= or d=
1628 ** appear, then u=, y=, a=, and b= are ignored.
@@ -2766,11 +2767,15 @@
2766 if( useDividers && zMark && zMark[0] ){
2767 double r = symbolic_name_to_mtime(zMark, 0);
2768 if( r>0.0 && !selectedRid ) selectedRid = timeline_add_divider(r);
2769 }
2770 blob_zero(&sql);
2771 db_prepare(&q, "SELECT * FROM timeline ORDER BY sortby DESC /*scan*/");
 
 
 
 
2772 if( fossil_islower(desc.aData[0]) ){
2773 desc.aData[0] = fossil_toupper(desc.aData[0]);
2774 }
2775 if( zBrName ){
2776 if( !PB("nowiki")
2777
--- src/timeline.c
+++ src/timeline.c
@@ -1619,10 +1619,11 @@
1619 ** to see all changes for the current year.
1620 ** days=N Show events over the previous N days
1621 ** datefmt=N Override the date format: 0=HH:MM, 1=HH:MM:SS,
1622 ** 2=YYYY-MM-DD HH:MM:SS, 3=YYMMDD HH:MM, and 4 means "off".
1623 ** bisect Show the check-ins that are in the current bisect
1624 ** oldestfirst Show events oldest first.
1625 ** showid Show RIDs
1626 ** showsql Show the SQL text
1627 **
1628 ** p= and d= can appear individually or together. If either p= or d=
1629 ** appear, then u=, y=, a=, and b= are ignored.
@@ -2766,11 +2767,15 @@
2767 if( useDividers && zMark && zMark[0] ){
2768 double r = symbolic_name_to_mtime(zMark, 0);
2769 if( r>0.0 && !selectedRid ) selectedRid = timeline_add_divider(r);
2770 }
2771 blob_zero(&sql);
2772 if( PB("oldestfirst") ){
2773 db_prepare(&q, "SELECT * FROM timeline ORDER BY sortby ASC /*scan*/");
2774 }else{
2775 db_prepare(&q, "SELECT * FROM timeline ORDER BY sortby DESC /*scan*/");
2776 }
2777 if( fossil_islower(desc.aData[0]) ){
2778 desc.aData[0] = fossil_toupper(desc.aData[0]);
2779 }
2780 if( zBrName ){
2781 if( !PB("nowiki")
2782

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button