Fossil SCM
Allow events to be referenced using a prefix of their full event-id.
Commit
f2025072b4bf72bad061d21f48485a95607789e8
Parent
26c262cd03144e9…
1 file changed
+7
-2
+7
-2
| --- src/event.c | ||
| +++ src/event.c | ||
| @@ -46,11 +46,16 @@ | ||
| 46 | 46 | free(zEventId); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /* |
| 50 | 50 | ** WEBPAGE: event |
| 51 | -** URL: /event?name=EVENTID&detail=BOOLEAN&aid=ARTIFACTID | |
| 51 | +** URL: /event | |
| 52 | +** PARAMETERS: | |
| 53 | +** | |
| 54 | +** name=EVENTID // Identify the event to display EVENTID must be complete | |
| 55 | +** detail=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. | |
| 56 | +** aid=ARTIFACTID // Which specific version of the event. Optional. | |
| 52 | 57 | ** |
| 53 | 58 | ** Display an existing event identified by EVENTID |
| 54 | 59 | */ |
| 55 | 60 | void event_page(void){ |
| 56 | 61 | int rid = 0; /* rid of the event artifact */ |
| @@ -82,11 +87,11 @@ | ||
| 82 | 87 | zUuid = (char*)P("aid"); |
| 83 | 88 | specRid = zUuid ? uuid_to_rid(zUuid, 0) : 0; |
| 84 | 89 | rid = nextRid = prevRid = 0; |
| 85 | 90 | db_prepare(&q1, |
| 86 | 91 | "SELECT rid FROM tagxref" |
| 87 | - " WHERE tagid=(SELECT tagid FROM tag WHERE tagname='event-%q')" | |
| 92 | + " WHERE tagid=(SELECT tagid FROM tag WHERE tagname GLOB 'event-%q*')" | |
| 88 | 93 | " ORDER BY mtime DESC", |
| 89 | 94 | zEventId |
| 90 | 95 | ); |
| 91 | 96 | while( db_step(&q1)==SQLITE_ROW ){ |
| 92 | 97 | nextRid = rid; |
| 93 | 98 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -46,11 +46,16 @@ | |
| 46 | free(zEventId); |
| 47 | } |
| 48 | |
| 49 | /* |
| 50 | ** WEBPAGE: event |
| 51 | ** URL: /event?name=EVENTID&detail=BOOLEAN&aid=ARTIFACTID |
| 52 | ** |
| 53 | ** Display an existing event identified by EVENTID |
| 54 | */ |
| 55 | void event_page(void){ |
| 56 | int rid = 0; /* rid of the event artifact */ |
| @@ -82,11 +87,11 @@ | |
| 82 | zUuid = (char*)P("aid"); |
| 83 | specRid = zUuid ? uuid_to_rid(zUuid, 0) : 0; |
| 84 | rid = nextRid = prevRid = 0; |
| 85 | db_prepare(&q1, |
| 86 | "SELECT rid FROM tagxref" |
| 87 | " WHERE tagid=(SELECT tagid FROM tag WHERE tagname='event-%q')" |
| 88 | " ORDER BY mtime DESC", |
| 89 | zEventId |
| 90 | ); |
| 91 | while( db_step(&q1)==SQLITE_ROW ){ |
| 92 | nextRid = rid; |
| 93 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -46,11 +46,16 @@ | |
| 46 | free(zEventId); |
| 47 | } |
| 48 | |
| 49 | /* |
| 50 | ** WEBPAGE: event |
| 51 | ** URL: /event |
| 52 | ** PARAMETERS: |
| 53 | ** |
| 54 | ** name=EVENTID // Identify the event to display EVENTID must be complete |
| 55 | ** detail=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. |
| 56 | ** aid=ARTIFACTID // Which specific version of the event. Optional. |
| 57 | ** |
| 58 | ** Display an existing event identified by EVENTID |
| 59 | */ |
| 60 | void event_page(void){ |
| 61 | int rid = 0; /* rid of the event artifact */ |
| @@ -82,11 +87,11 @@ | |
| 87 | zUuid = (char*)P("aid"); |
| 88 | specRid = zUuid ? uuid_to_rid(zUuid, 0) : 0; |
| 89 | rid = nextRid = prevRid = 0; |
| 90 | db_prepare(&q1, |
| 91 | "SELECT rid FROM tagxref" |
| 92 | " WHERE tagid=(SELECT tagid FROM tag WHERE tagname GLOB 'event-%q*')" |
| 93 | " ORDER BY mtime DESC", |
| 94 | zEventId |
| 95 | ); |
| 96 | while( db_step(&q1)==SQLITE_ROW ){ |
| 97 | nextRid = rid; |
| 98 |